/**
 * Eurocampus Deutsche Schule Mallorca
 * Stylesheet für AG-Buchungssystem
 * Farben & Typografie angelehnt an https://www.dsmallorca.de/
 */

:root {
  --primary: #003685;
  --primary-hover: #002766;
  --primary-light: #e6eef9;
  --secondary: #e2e8f0;
  --accent: #ffd100;
  --text-main: #2d3748;
  --text-muted: #718096;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background-color: var(--primary);
  color: #ffffff;
  padding: 6px 20px;
  font-size: 13px;
}

.header-top-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
}

.header-top a:hover {
  opacity: 1;
  text-decoration: underline;
}

.header-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Parent Quick Access in Header */
.parent-quick-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-page);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.parent-quick-bar input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  width: 220px;
}

.parent-quick-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 54, 133, 0.15);
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Hero Section */
.hero-box {
  background: linear-gradient(135deg, var(--primary) 0%, #002255 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 30px 35px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-box::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 209, 0, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.hero-box h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-box p {
  font-size: 15px;
  opacity: 0.92;
  max-width: 750px;
}

.hero-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

/* Activity Description Cards */
.intro-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.intro-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s ease;
}

.intro-card:hover {
  box-shadow: var(--shadow-md);
}

.intro-card-header {
  margin-bottom: 2px;
}

.intro-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.intro-card-text {
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
}

/* Payment & Fees Info Box */
.fees-box {
  background: #fdf8e6;
  border: 1px solid #fae8a4;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 30px;
  font-size: 14px;
  color: #4a3800;
}

.fees-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fees-box p {
  margin-bottom: 6px;
  line-height: 1.5;
}

.fees-box p:last-child {
  margin-bottom: 0;
}

/* Deadline Notice in Hero */
.deadline-notice {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}


/* Tabs / Switcher */
.nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.badge-count {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Calendar Vertical Table */
.calendar-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.calendar-card-header {
  padding: 20px 25px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Vertical Table Layout */
.vertical-table {
  width: 100%;
  border-collapse: collapse;
}

.vertical-table th {
  background: #f8fafc;
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.vertical-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.vertical-table tr:last-child td {
  border-bottom: none;
}

.vertical-table tr:hover td {
  background-color: #fbfcfe;
}

/* Specific Columns */
.col-subject {
  display: flex;
  align-items: center;
}

.subject-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.subject-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.col-date .date-main {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.col-date .date-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.col-time {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

/* Capacity Indicator */
.capacity-box {
  min-width: 150px;
}

.capacity-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.capacity-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.capacity-fill.available {
  background: var(--success);
}

.capacity-fill.full {
  background: var(--danger);
}

.capacity-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-status.available {
  background: var(--success-bg);
  color: var(--success);
}

.badge-status.full {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(0, 54, 133, 0.25);
  transform: translateY(-1px);
}

.btn-disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  border: 1px solid #cbd5e1;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-page);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  background: var(--primary);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
}

/* Summary Box in Modal */
.modal-summary {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.modal-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.modal-summary-row:last-child {
  margin-bottom: 0;
}

.modal-summary-label {
  color: var(--primary);
  font-weight: 600;
}

.modal-summary-value {
  font-weight: 700;
  color: #0f172a;
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 54, 133, 0.15);
}

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  border-left: 5px solid var(--primary);
  max-width: 400px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* "My Bookings" Section */
.my-bookings-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 25px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.6;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 25px 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-inner a {
  color: var(--primary);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vertical-table thead {
    display: none;
  }
  .vertical-table, .vertical-table tbody, .vertical-table tr, .vertical-table td {
    display: block;
    width: 100%;
  }
  .vertical-table tr {
    border-bottom: 8px solid var(--bg-page);
    padding: 16px;
  }
  .vertical-table td {
    border-bottom: none;
    padding: 8px 0;
  }
  .header-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .parent-quick-bar {
    width: 100%;
  }
  .parent-quick-bar input {
    flex: 1;
  }
}
