/* Protestantse Kerk Branding Colors */
:root {
  --pk-orange: #F67C32;
  --pk-orange-light: #FF8C42;
  --pk-orange-dark: #E5631F;
  --pk-purple: #8B5A8C;
  --pk-purple-light: #A270A3;
  --pk-purple-dark: #6B4A6C;
  --pk-gray: #6C7278;
  --pk-gray-light: #F8F9FA;
  --pk-text-dark: #2C2C2C;
}

html {
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  color: var(--pk-text-dark);
  background-color: #fafbfc;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--pk-orange);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Enhanced Button Styling */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--pk-orange);
  border: none;
  color: white;
}

.btn-primary:hover {
  background: var(--pk-orange-dark);
  border: none;
  color: white;
}

.btn-success {
  background: var(--pk-purple);
  border: none;
  color: white;
}

.btn-success:hover {
  background: var(--pk-purple-dark);
  border: none;
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border: none;
  color: #212529 !important;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
  border: none;
  color: #212529 !important;
}

.btn-info {
  background: var(--pk-purple);
  border: none;
  color: white !important;
}

.btn-info:hover {
  background: var(--pk-purple-dark);
  border: none;
  color: white !important;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
  border: none;
}

.btn-secondary {
  background: var(--pk-purple);
  border: none;
  color: white;
}

.btn-secondary:hover {
  background: var(--pk-purple-dark);
  border: none;
  color: white;
}

/* Outline button improvements */
.btn-outline-primary {
  border: 2px solid var(--pk-orange);
  color: var(--pk-orange);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--pk-orange);
  border-color: var(--pk-orange);
  color: white;
}

.btn-outline-secondary {
  border: 2px solid var(--pk-purple);
  color: var(--pk-purple);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--pk-purple);
  border-color: var(--pk-purple);
  color: white;
}

/* Button groups */
.btn-group .btn {
  box-shadow: none;
}

.btn-group .btn:hover {
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Small buttons */
.btn-sm {
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* Icon buttons */
.btn i {
  margin-right: 0.5rem;
}

.btn i:only-child {
  margin-right: 0;
}

/* Action button groups */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-buttons .btn {
  flex: 0 0 auto;
}

/* Floating action button */
.btn-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-floating:hover {
  transform: scale(1.1);
}

/* Status badge buttons */
.btn-status {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Protestantse Kerk Card Styling */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  background: white;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
  border-radius: 16px 16px 0 0 !important;
  border: none;
  padding: 1.25rem 1.5rem;
  background: var(--pk-purple);
  color: white !important;
  font-weight: 600;
}

.card-header.bg-secondary {
  background: var(--pk-orange) !important;
  color: white !important;
}

.card-header.bg-danger {
  background: #dc3545 !important;
  color: white !important;
}

.card-header.bg-dark {
  background: var(--pk-gray) !important;
  color: white !important;
}

.card-header.bg-primary {
  background: var(--pk-purple) !important;
  color: white !important;
}

.card-body {
  padding: 1.5rem;
}

/* Headers with Purple Color like Protestant Church */
h1, h2, h3, h4, h5, h6 {
  color: var(--pk-purple);
  font-weight: 600;
}

h1.dashboard-title {
  color: var(--pk-purple);
  font-weight: 700;
}

/* Card headers with dark backgrounds need white text */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
  color: white !important;
}

/* Specific overrides for different background colors */
.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6,
.card-header.bg-secondary h1,
.card-header.bg-secondary h2,
.card-header.bg-secondary h3,
.card-header.bg-secondary h4,
.card-header.bg-secondary h5,
.card-header.bg-secondary h6,
.card-header.bg-danger h1,
.card-header.bg-danger h2,
.card-header.bg-danger h3,
.card-header.bg-danger h4,
.card-header.bg-danger h5,
.card-header.bg-danger h6,
.card-header.bg-dark h1,
.card-header.bg-dark h2,
.card-header.bg-dark h3,
.card-header.bg-dark h4,
.card-header.bg-dark h5,
.card-header.bg-dark h6 {
  color: white !important;
}

/* Orange buttons like in Protestant Church site */
.btn-warning {
  background: var(--pk-orange);
  border: none;
  color: white !important;
}

.btn-warning:hover {
  background: var(--pk-orange-dark);
  border: none;
  color: white !important;
}

/* Navigation improvements */
.navbar-brand {
  font-weight: 700;
  color: var(--pk-purple) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--pk-text-dark) !important;
}

.nav-link:hover {
  color: var(--pk-orange) !important;
}

/* Alert styling */
.alert {
  border: none;
  border-radius: 12px;
  border-left: 4px solid var(--pk-orange);
}

/* Table improvements */
.table {
  border-radius: 12px;
  overflow: hidden;
}

.table thead th {
  background: var(--pk-gray-light);
  color: var(--pk-text-dark);
  border: none;
  font-weight: 600;
}

/* Badge improvements */
.badge {
  font-size: 0.75rem;
  padding: 0.5em 0.75em;
  border-radius: 8px;
}

.badge.bg-info {
  background: var(--pk-purple) !important;
}

.badge.bg-warning {
  background: var(--pk-orange) !important;
  color: white !important;
}

/* Footer */
.footer {
  background: var(--pk-gray-light);
  color: var(--pk-text-dark);
  border-top: 1px solid #e9ecef;
}

.footer a {
  color: var(--pk-orange);
  text-decoration: none;
}

.footer a:hover {
  color: var(--pk-orange-dark);
}

/* Form improvements */
.form-control {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--pk-orange);
  box-shadow: 0 0 0 0.2rem rgba(246, 124, 50, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--pk-text-dark);
  margin-bottom: 0.5rem;
}

.form-select {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.form-select:focus {
  border-color: var(--pk-orange);
  box-shadow: 0 0 0 0.2rem rgba(246, 124, 50, 0.25);
}

/* Page title styling */
.page-header {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-header h1 {
  color: var(--pk-purple);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--pk-gray);
  margin-bottom: 0;
}

/* Breadcrumb styling */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--pk-gray);
  content: ">";
}

.breadcrumb-item a {
  color: var(--pk-orange);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--pk-text-dark);
}

/* Balanced color usage - less orange, more purple as primary */
.card-header.orange-header {
  background: var(--pk-orange) !important;
  color: white !important;
}

.card-header.purple-header {
  background: var(--pk-purple) !important;
  color: white !important;
}

/* Make some elements more purple-focused */
.btn-outline-success {
  border: 2px solid var(--pk-purple);
  color: var(--pk-purple);
  background: transparent;
}

.btn-outline-success:hover {
  background: var(--pk-purple);
  border-color: var(--pk-purple);
  color: white;
}

/* Nested cards styling - different header colors for cards within cards */
.card .card .card-header {
  background: var(--pk-orange) !important;
  color: white !important;
}

.card .card .card-header.bg-primary {
  background: var(--pk-orange) !important;
}

.card .card .card-header.bg-secondary {
  background: var(--pk-gray) !important;
}

.card .card .card-header.bg-warning {
  background: #ffc107 !important;
  color: #212529 !important;
}

.card .card .card-header.bg-info {
  background: #17a2b8 !important;
}

.card .card .card-header.bg-success {
  background: #28a745 !important;
}

/* Button spacing improvements - specific contexts only */

.action-buttons .btn,
.btn-group-vertical .btn {
  margin-bottom: 0.5rem !important;
}

.btn-group-vertical .btn:last-child {
  margin-bottom: 0 !important;
}

/* Card footer button spacing */
.card-footer .btn {
  margin-right: 0.75rem !important;
}

.card-footer .btn:last-child {
  margin-right: 0 !important;
}

/* Action buttons in cards */
.card-body .btn,
.card .btn {
  margin-right: 0.5rem !important;
}

.card-body .btn:last-child,
.card .btn:last-child {
  margin-right: 0 !important;
}

/* Inline button spacing */
.d-flex .btn,
.d-inline-flex .btn {
  margin-right: 0.5rem !important;
}

.d-flex .btn:last-child,
.d-inline-flex .btn:last-child {
  margin-right: 0 !important;
}

/* Vertical button spacing in flex containers */
.d-flex.flex-column .btn {
  margin-bottom: 0.5rem !important;
}

.d-flex.flex-column .btn:last-child {
  margin-bottom: 0 !important;
}

/* Specific table cell button spacing - 8px margins */
table td .btn,
.table td .btn,
tbody td .btn {
  margin: 4px !important;
}

/* Action buttons wrapper in tables */
.table .action-buttons,
table .action-buttons {
  white-space: nowrap;
}

.table .action-buttons .btn,
table .action-buttons .btn {
  margin-right: 0.5rem !important;
}

.table .action-buttons .btn:last-child,
table .action-buttons .btn:last-child {
  margin-right: 0 !important;
}

/* Wider action column in tables */
.table th:last-child,
.table td:last-child,
table th:last-child,
table td:last-child {
  width: 160px !important;
  min-width: 160px !important;
}

/* Specific styling for action columns */
.table .action-column,
table .action-column {
  width: 160px !important;
  min-width: 160px !important;
  text-align: center;
}

/* Button sizing in action columns */
.table .action-column .btn,
table .action-column .btn {
  min-width: 70px;
  font-size: 0.875rem;
}

/* Statistics cards styling - colored backgrounds with white text */
.stat-card {
  color: white !important;
}

.stat-card.bg-primary {
  background: var(--pk-purple) !important;
  color: white !important;
}

.stat-card.bg-success {
  background: #28a745 !important;
  color: white !important;
}

.stat-card.bg-info {
  background: #17a2b8 !important;
  color: white !important;
}

.stat-card.bg-warning {
  background: var(--pk-orange) !important;
  color: white !important;
}

.stat-card.bg-danger {
  background: #dc3545 !important;
  color: white !important;
}

/* Text in statistics cards should be white for better readability */
.stat-card h1, .stat-card h2, .stat-card h3, .stat-card h4, .stat-card h5, .stat-card h6,
.stat-card .h1, .stat-card .h2, .stat-card .h3, .stat-card .h4, .stat-card .h5, .stat-card .h6 {
  color: white !important;
}

.stat-card small, .stat-card .small, .stat-card .text-white-50 {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Ensure all headings in cards with dark backgrounds are white */
.card[style*="background: var(--pk-purple)"] h1,
.card[style*="background: var(--pk-purple)"] h2,
.card[style*="background: var(--pk-purple)"] h3,
.card[style*="background: var(--pk-purple)"] h4,
.card[style*="background: var(--pk-purple)"] h5,
.card[style*="background: var(--pk-purple)"] h6,
.card[style*="background: var(--pk-orange)"] h1,
.card[style*="background: var(--pk-orange)"] h2,
.card[style*="background: var(--pk-orange)"] h3,
.card[style*="background: var(--pk-orange)"] h4,
.card[style*="background: var(--pk-orange)"] h5,
.card[style*="background: var(--pk-orange)"] h6,
.card[style*="background: var(--pk-gray)"] h1,
.card[style*="background: var(--pk-gray)"] h2,
.card[style*="background: var(--pk-gray)"] h3,
.card[style*="background: var(--pk-gray)"] h4,
.card[style*="background: var(--pk-gray)"] h5,
.card[style*="background: var(--pk-gray)"] h6,
.card[style*="background: #"] h1,
.card[style*="background: #"] h2,
.card[style*="background: #"] h3,
.card[style*="background: #"] h4,
.card[style*="background: #"] h5,
.card[style*="background: #"] h6 {
  color: white !important;
}

/* Ensure all text elements in cards with dark backgrounds are white */
.card[style*="background: var(--pk-purple)"] .h3,
.card[style*="background: var(--pk-orange)"] .h3,
.card[style*="background: var(--pk-gray)"] .h3,
.card[style*="background: #"] .h3 {
  color: white !important;
}

/* Dashboard stat cards specific styling */
.card.text-white h1,
.card.text-white h2,
.card.text-white h3,
.card.text-white h4,
.card.text-white h5,
.card.text-white h6,
.card.text-white .h1,
.card.text-white .h2,
.card.text-white .h3,
.card.text-white .h4,
.card.text-white .h5,
.card.text-white .h6 {
  color: white !important;
}

.card.text-white .small {
  color: rgba(255, 255, 255, 0.8) !important;
}