/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #f9fafb;
  color: #111827;
  line-height: 1.6;
}

/* ===== Navbar ===== */
nav#nav-content {
  background: #1f2937;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

nav#nav-content .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

/* Hamburger (mobile) */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #fff; /* white for visibility */
  position: absolute;
  right: 1rem;
  z-index: 1002; /* above overlay and menu */
  transition: transform 0.3s ease;
}

.menu-toggle.open {
  transform: rotate(90deg); /* subtle rotation when open */
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #f3f4f6;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #bbdefb; /* light blue hover */
}

.nav-links a.active {
  background: #1565c0; /* slightly darker blue */
  color: white;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #0d47a1; /* match header blue */
    position: fixed;
    top: 0;
    right: -260px; /* hidden offscreen */
    height: 100vh;
    width: 220px;
    padding: 2rem 1rem;
    box-shadow: -2px 0 12px rgba(0,0,0,0.25);
    border-radius: 0 0.75rem 0.75rem 0;
    transition: right 0.3s ease;
    z-index: 1001;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links a {
    width: 100%;
    font-size: 1.1rem;
  }

  /* Mobile overlay behind menu */
  #mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
  }

  #mobile-overlay.active {
    display: block;
  }
}

/* ===== Footer ===== */
#footer-content {
  background: #1f2937; /* same as navbar for consistency */
  color: #d1d5db; /* light gray text */
  padding: 2rem 1rem;
  margin-top: 3rem;
}

#footer-content .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Social Media Links */
#footer-content .social-media {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

#footer-content .social-media a {
  color: #f3f4f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#footer-content .social-media a:hover {
  color: blue; /* sporty green */
}

/* Legal Links */
#footer-content .legal-links {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  font-size: 0.9rem;
}

#footer-content .legal-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

#footer-content .legal-links a:hover {
  color: blue;
}

/* Copyright */
#footer-content p {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  #footer-content .container {
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #footer-content .legal-links {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* ===== General Sections ===== */
section {
  padding: 3rem 1rem;
}

section .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Headings */
h1, h2 {
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  color: #111827;
}

h2 {
  font-size: 1.5rem;
  color: #1f2937;
  border-bottom: 3px solid blue;
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* ===== Floating Wedge Notice ===== */
#facility-wedge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 320px;
  background: linear-gradient(135deg, #facc15, #f87171); /* Warning colors */
  color: #111827;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 9999;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

/* Expanded state */
#facility-wedge.expanded {
  max-height: 220px;
}

/* Compressed state */
#facility-wedge.compressed {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse 1.5s infinite;
}

/* Show icon in compressed mode */
#facility-wedge.compressed::before {
  content: "🏸";
  font-size: 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hide text in compressed mode */
#facility-wedge.compressed p {
  display: none;
}

/* Expanded text */
#facility-wedge p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

/* Pulse animation for attention */
@keyframes pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,0.6); }
  70%  { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(220,38,38,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  #facility-wedge {
    right: 6px;       /* keep some margin from screen edge */
    left: auto;        /* disable left positioning */
    bottom: 15px;
    max-width: unset;
    font-size: 0.85rem;
  }

  #facility-wedge.compressed {
    width: 60px;
    height: 60px;
  }

  #facility-wedge.compressed::before {
    content: "🏸";
    font-size: 1.8rem;
    position: relative;
    top: 6px; /* adjust vertical placement */
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* ===== Hero/Home Section ===== */
#home header {
  background: linear-gradient(135deg, blue, #16a34a);
  color: white;
  border-radius: 1rem;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: -3rem;
}

#home h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#home img {
  margin-top: 1rem;
  max-width: 220px;
  height: auto;
}

/* ===== Mobile Adjustments for Top Sections ===== */
@media (max-width: 480px) {
  /* Home Section */
  #home header {
    padding: 1.5rem 1rem;   /* reduce vertical padding */
    border-radius: 0.8rem;  /* slightly smaller radius */
    margin-top: -1rem;
  }

  #home h1 {
    font-size: 2rem;      /* smaller heading on mobile */
    margin-bottom: 0.5rem;
  }

  #home img {
    max-width: 160px;       /* smaller logo */
    margin-top: 0.5rem;
  }

  /* Image Gallery Section */
  #image-gallery {
    margin-top: 1rem;     /* bring gallery closer to home */
    padding: 0 0.5rem;
  }

  #image-gallery h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  #image-gallery .image-grid {
    gap: 0.5rem;            /* reduce spacing between images */
  }

  #image-gallery .court-dim-img {
    max-width: 100%;
    margin-top: 0.5rem;
  }

  /* Court Rules Section */
  #court-rules {
    margin-top: 0.5rem;     /* reduce spacing above rules */
    padding: 0 0.5rem;
  }

  #court-rules h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  #court-rules .rules-grid {
    gap: 0.5rem;            /* reduce space between rule cards */
  }

  #court-rules .rule-card p {
    font-size: 0.85rem;     /* slightly smaller text */
  }
}


/* ===== Image Gallery ===== */
#image-gallery h2 {
  margin-bottom: 1.5rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.image-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.03);
}

.court-dim-img {
  margin-top: 1rem;
  max-width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== Location Section ===== */
#location {
  background: #f3f4f6;
  border-radius: 1rem;
}

#location p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

/* ===== Court Rules - Modern Card Style ===== */
#court-rules {
    background: #f9fafb;
    padding: 60px 20px;
    text-align: center;
    border-radius: 1rem;
}

#court-rules h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #111827;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.rule-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.rule-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: blue; /* Matches your theme */
}

.rule-card p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.4;
    text-align: center;
}

/* ===== Operation Hours Table - Modern Style ===== */
#operation-hours {
    background: #f3f4f6;
    padding: 60px 20px;
    border-radius: 1rem;
    text-align: center;
}

#operation-hours h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #111827;
}

#operation-hours table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    font-size: 1rem;
}

#operation-hours th, 
#operation-hours td {
    padding: 1rem 1.5rem;
    text-align: center;
}

#operation-hours thead {
    background: linear-gradient(90deg, blue, #16a34a);
    color: #fff;
    font-weight: 600;
}

#operation-hours tbody tr {
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

#operation-hours tbody tr:nth-child(even) {
    background: #f9fafb;
}

#operation-hours tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    #operation-hours table, 
    #operation-hours thead, 
    #operation-hours tbody, 
    #operation-hours th, 
    #operation-hours td, 
    #operation-hours tr {
        display: block;
        width: 100%;
    }

    #operation-hours thead {
        display: none;
    }

    #operation-hours tbody tr {
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
    }

    #operation-hours td {
        text-align: right;
        padding: 0.75rem 1rem;
        position: relative;
    }

    #operation-hours td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 0.75rem;
        font-weight: 600;
        color: #374151;
    }
}

/* ===== FAQ Section ===== */
#faq {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

#faq h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #1f2937;
  border-bottom: 3px solid blue;
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* ===== FAQ Items ===== */
.faq-item {
  background: white;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.faq-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

/* Icon */
.faq-item h3::after {
  content: "+";
  font-size: 1.3rem;
  color: blue;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
  margin-left: 0.5rem;
}

.faq-item.open h3::after {
  transform: rotate(45deg) scale(1.2); /* + becomes × shape */
  color: #16a34a;
}

/* Answer Content */
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  margin-top: 0.5rem;
}

.faq-item.open .faq-answer {
  opacity: 1;
  max-height: 600px; /* large enough to fit content */
}

/* ===== Contact Section ===== */
#contact {
  max-width: 800px;
  margin: 3rem auto 2rem auto;
  padding: 0 1rem;
  text-align: center;
}

#contact h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
  border-bottom: 3px solid blue;
  display: inline-block;
  padding-bottom: 0.25rem;
}

#contact p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #374151;
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-align: left;
  color: #111827;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: blue;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  outline: none;
}

/* Textarea */
textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

/* Submit Button */
.btn-submit {
  background: blue;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-submit:hover {
  background: #16a34a;
}

.btn-submit:active {
  transform: scale(0.98);
}

/* ===== Login Section ===== */
#login {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

#login h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  text-align: left;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
  border-color: blue;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  outline: none;
}

/* Submit Button */
#login .btn-submit {
  background: blue;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#login .btn-submit:hover {
  background: #16a34a;
}

#login .btn-submit:active {
  transform: scale(0.98);
}

/* Additional Links */
.login-form p {
  font-size: 0.9rem;
  text-align: center;
  color: #374151;
}

.login-form p a {
  color: blue;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-form p a:hover {
  color: #16a34a;
  text-decoration: underline;
}

/* Error Message */
#login p[style*="color: red"] {
  background: #fee2e2;
  color: #b91c1c !important;
  font-weight: 500;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  border: 1px solid #fecaca;
}

/* ===== Registration & Password Reset ===== */
#registration-section,
#password-reset-section {
  max-width: 450px;
  margin: 4rem auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

#registration-section h2,
#password-reset-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #1f2937;
  text-align: center;
}

/* Forms */
.signup-form,
#password-reset-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.signup-form label,
#password-reset-section label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  text-align: left;
}

.signup-form input,
#password-reset-section input {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.signup-form input:focus,
#password-reset-section input:focus {
  border-color: blue;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  outline: none;
}

/* Submit Button */
#registration-section .btn-submit,
#password-reset-section .btn-submit {
  background: blue;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#registration-section .btn-submit:hover,
#password-reset-section .btn-submit:hover {
  background: #16a34a;
}

#registration-section .btn-submit:active,
#password-reset-section .btn-submit:active {
  transform: scale(0.98);
}

/* Links */
.signup-form p,
#password-reset-section p {
  font-size: 0.9rem;
  text-align: center;
  color: #374151;
}

.signup-form p a,
#password-reset-section p a {
  color: blue;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.signup-form p a:hover,
#password-reset-section p a:hover {
  color: #16a34a;
  text-decoration: underline;
}

/* ===== Popups ===== */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  animation: popupFade 0.3s ease;
  border-top: 6px solid blue; /* default = success green */
}

.popup h2 {
  font-size: 1.5rem;
  color: #1f2937;
  margin-bottom: 1rem;
}

.popup p,
.popup label {
  color: #374151;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.popup input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
}

.popup input:focus {
  border-color: blue;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  outline: none;
}

.popup button {
  background: blue;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.popup button:hover {
  background: #16a34a;
}

.popup button:active {
  transform: scale(0.98);
}

/* Popup Variants */
#popup-success .popup {
  border-top-color: blue; /* green */
}

#popup-verficiation .popup {
  border-top-color: #eab308; /* yellow */
}

#verification-fail .popup,
#popup-fail-email .popup,
#popup-reset-fail .popup {
  border-top-color: #ef4444; /* red */
}

#popup-reset-sent .popup {
  border-top-color: blue; /* green */
}

/* Popup Animation */
@keyframes popupFade {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Loading Overlay ===== */
.loading-overlay {
  position: fixed; /* stick to viewport */
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.loading-spinner {
  border: 4px solid #d1d5db;
  border-top: 4px solid blue;
  border-radius: 50%;
  width: 50px; 
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Popup Buttons by Type ===== */
#popup-success .popup button,
#popup-reset-sent .popup button {
  background: blue; /* green */
}

#popup-success .popup button:hover,
#popup-reset-sent .popup button:hover {
  background: #16a34a;
}

#popup-verficiation .popup button {
  background: #eab308; /* yellow */
  color: #1f2937; /* darker text for readability */
}

#popup-verficiation .popup button:hover {
  background: #ca8a04;
}

#verification-fail .popup button,
#popup-fail-email .popup button,
#popup-reset-fail .popup button {
  background: #ef4444; /* red */
}

#verification-fail .popup button:hover,
#popup-fail-email .popup button:hover,
#popup-reset-fail .popup button:hover {
  background: #dc2626;
}

/* Keep the general button active scaling */
.popup button:active {
  transform: scale(0.98);
}

/* ===== Popup Animation ===== */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: overlayFadeIn 0.3s ease forwards;
}

@keyframes overlayFadeIn {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.6); }
}

.popup {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transform: translateY(-30px);
  opacity: 0;
  animation: popupSlideFade 0.4s ease forwards;
}

@keyframes popupSlideFade {
  0% { transform: translateY(-30px); opacity: 0; }
  50% { transform: translateY(5px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ===== Popup Exit Animation ===== */
.popup.hide {
  animation: popupSlideFadeOut 0.3s ease forwards;
}

@keyframes popupSlideFadeOut {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px);
    opacity: 0;
  }
}

.overlay.hide {
  animation: overlayFadeOut 0.3s ease forwards;
}

@keyframes overlayFadeOut {
  from { background: rgba(0,0,0,0.6); }
  to { background: rgba(0,0,0,0); }
}

/* ==================== ERROR PAGE ==================== */
.error-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 70vh;
    padding: 2rem 1rem;
    color: #111827;
    background: #fefce8; /* soft sporty background */
}

.error-page h1 {
    font-size: 2rem;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.5;
}

.error-page a {
    color: blue;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.error-page a:hover {
    color: #16a34a;
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .error-page h1 {
        font-size: 1.5rem;
    }
}

/* ============================
   Admin Page Styles
   ============================ */
#admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* Headings */
#admin-dashboard h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

#admin-dashboard h2 {
    font-size: 1.5rem;
    color: #34495e;
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hamburger button */
#subnav-toggle {
  display: none; /* hidden on desktop */
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  color: var(--text-dark);
}

/* Hamburger bars */
#subnav-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--text-dark);
  transition: 0.3s;
}

/* Toggle animation for X */
#subnav-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#subnav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
#subnav-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile styles */
@media (max-width: 768px) {
  #subnav-toggle {
    display: block;
  }

  .admin-nav-links {
    display: none; /* hidden by default */
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-top: 1px solid #e5e7eb;
  }

  .admin-nav-links.show {
    display: flex; /* shown when toggled */
  }
}

/* Coaches Table */
/* Default desktop/tablet view */
#admin-dashboard #coachesTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#admin-dashboard #coachesTable th,
#admin-dashboard #coachesTable td {
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap;
}

#admin-dashboard #coachesTable th {
  background-color: blue;
  color: #fff;
  font-weight: 600;
}

#admin-dashboard #coachesTable tr:nth-child(even) {
  background-color: #f9fafb;
}

#admin-dashboard #coachesTable tr:hover {
  background-color: #eaf4ea;
}

/* Mobile stacked "card style" view */
@media (max-width: 600px) {
  #admin-dashboard #coachesTable,
  #admin-dashboard #coachesTable thead,
  #admin-dashboard #coachesTable tbody,
  #admin-dashboard #coachesTable th,
  #admin-dashboard #coachesTable td,
  #admin-dashboard #coachesTable tr {
    display: block;
    width: 100%;
  }

  #admin-dashboard #coachesTable thead {
    display: none; /* hide column headers */
  }

  #admin-dashboard #coachesTable tr {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  #admin-dashboard #coachesTable td {
    padding: 8px;
    text-align: right;
    position: relative;
  }

  #admin-dashboard #coachesTable td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: 600;
    text-align: left;
    color: #333;
  }
}

/* Tables */
/* Default desktop/tablet view */
#admin-dashboard #bookingsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#admin-dashboard #bookingsTable th,
#admin-dashboard #bookingsTable td {
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap; /* helps avoid text breaking weirdly */
}

#admin-dashboard #bookingsTable th {
  background-color: blue;
  color: #fff;
  font-weight: 600;
}

#admin-dashboard #bookingsTable tr:nth-child(even) {
  background-color: #f9fafb;
}

#admin-dashboard #bookingsTable tr:hover {
  background-color: #eaf4ea;
}

/* Scroll container for medium screens */
#admin-dashboard .admin-table-container {
  width: 100%;
  overflow-x: auto;
}

/* Default desktop/tablet keeps them inline */
#admin-dashboard #bookingsTable td.actions-cell {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
}

/* Mobile stacked "card style" view */
@media (max-width: 600px) {
  #admin-dashboard #bookingsTable,
  #admin-dashboard #bookingsTable thead,
  #admin-dashboard #bookingsTable tbody,
  #admin-dashboard #bookingsTable th,
  #admin-dashboard #bookingsTable td,
  #admin-dashboard #bookingsTable tr {
    display: block;
    width: 100%;
  }

  #admin-dashboard #bookingsTable thead {
    display: none; /* hide column headers */
  }

  #admin-dashboard #bookingsTable tr {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  #admin-dashboard #bookingsTable td {
    padding: 8px;
    text-align: right;
    position: relative;
  }

  #admin-dashboard #bookingsTable td::before {
    content: attr(data-label); /* use the data-label attribute as a pseudo-header */
    position: absolute;
    left: 10px;
    font-weight: 600;
    text-align: left;
    color: #333;
  }

  #admin-dashboard #bookingsTable td.actions-cell {
    flex-direction: column;
    align-items: stretch;  /* buttons expand full width */
  }

  #admin-dashboard #bookingsTable td.actions-cell button,
  #admin-dashboard #bookingsTable td.actions-cell .copy-link {
    width: 100%;          /* make each button full width */
    text-align: center;
  }
}

/* Buttons */
#admin-dashboard button {
    background-color: blue;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

#admin-dashboard button:hover {
    background-color: #16a34a;
}

/* Inputs */
#admin-dashboard input,
#admin-dashboard select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin: 8px 0;
    width: 100%;
}

/* Search Box */
#admin-dashboard .search-box {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#admin-dashboard .search-box input {
    width: 100%;
}

#admin-dashboard .search-box button {
    align-self: start;
}

/* Tables */
#admin-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#admin-dashboard table th,
#admin-dashboard table td {
    padding: 12px 15px;
    text-align: left;
}

#admin-dashboard table th {
    background-color: blue;
    color: #fff;
    font-weight: 600;
}

#admin-dashboard table tr:nth-child(even) {
    background-color: #f9fafb;
}

#admin-dashboard table tr:hover {
    background-color: #eaf4ea;
}

/* Modals */
#admin-dashboard .modal,
#admin-dashboard .small-modal,
#admin-dashboard .popup-bookings {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    z-index: 1000;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
    overflow-y: auto;
    max-height: 85vh;
    transition: all 0.3s ease-in-out;
    font-family: 'Inter', sans-serif;
}

/* Modal Content */
#admin-dashboard .modal-content {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    line-height: 1.4;
    position: relative;
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Modal Header */
#admin-dashboard .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#admin-dashboard .modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

#admin-dashboard .modal-header .close {
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease, transform 0.2s ease;
}

#admin-dashboard .modal-header .close:hover {
    color: #333;
    transform: scale(1.1);
}

/* Modal Body */
#admin-dashboard .modal-body {
    margin-top: 0.5rem;
}

#admin-dashboard .modal-body p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Generic Modal H2 and P */
#admin-dashboard .modal h2 {
    font-size: 1.35rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

#admin-dashboard .modal p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Close Button (for any modal) */
#admin-dashboard .close {
    font-size: 1.3rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s ease, transform 0.2s ease;
}

#admin-dashboard .close:hover {
    color: #444;
    transform: scale(1.05);
}

/* Modal Overlay */
#admin-dashboard .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
    transition: opacity 0.3s ease;
}

/* Dropdown container */
#admin-dashboard .dropdown-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

#admin-dashboard .dropdown-container label {
    font-weight: 600;
}

/* Tooltip icons */
#admin-dashboard h2 span {
    font-size: 1.1rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    #admin-dashboard .dropdown-container {
        flex-direction: column;
    }

    #admin-dashboard h1 {
        font-size: 1.7rem;
    }

    #admin-dashboard h2 {
        font-size: 1.2rem;
    }

    #admin-dashboard button,
    #admin-dashboard input,
    #admin-dashboard select {
        font-size: 0.95rem;
    }

    #admin-dashboard table th,
    #admin-dashboard table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    #admin-dashboard {
        padding: 20px 15px;
    }

    #admin-dashboard h1 {
        font-size: 1.5rem;
    }

    #admin-dashboard h2 {
        font-size: 1.1rem;
    }
}

/* Recurring Bookings dropdowns stacked vertically */
#recurringBookingsDiv .dropdown-container {
    flex-direction: column;   /* stack items vertically */
    gap: 10px;                /* spacing between dropdowns */
}

#recurringBookingsDiv .dropdown-container select.dropdown {
    width: 160px;             /* set a reasonable width */
    max-width: 100%;          /* responsive fallback */
    padding: 6px 10px;
    font-size: 0.95rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Shorter search textbox for Order Number Lookup */
#orderNumberLookupSearchBar input#orderInput {
    width: 200px;         /* adjust width as needed */
    max-width: 100%;      /* ensures it remains responsive on small screens */
    padding: 6px 10px;    /* slightly smaller padding to match width */
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Courts Times Table - Mobile Friendly */
@media (max-width: 600px) {
  /* Courts table container for horizontal scrolling on mobile */
  #timeCourtSlotsDiv {
      overflow-x: auto;
  }

  #courtsTimesTable {
      width: 100%;
      border-collapse: collapse;
      min-width: 600px; /* ensures scroll appears if table is wider than container */
  }

  #courtsTimesTable th,
  #courtsTimesTable td {
      padding: 10px 12px;
      text-align: center;
      border: 1px solid #e5e7eb;
  }

  #courtsTimesTable th {
      background-color: blue;
      color: #fff;
      font-weight: 600;
  }

  #courtsTimesTable tr:nth-child(even) {
      background-color: #f9fafb;
  }

  #courtsTimesTable tr:hover {
      background-color: #eaf4ea;
  }

  /* Optional: freeze first column (Time) on scroll */
  #courtsTimesTable th:first-child,
  #courtsTimesTable td:first-child {
      position: sticky;
      left: 0;
      background-color: #fff;
      z-index: 1;
      font-weight: 600;
  }
}

/* Desktop/tablet view */
#admin-dashboard #bookingsLookupResultsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#admin-dashboard #bookingsLookupResultsTable th,
#admin-dashboard #bookingsLookupResultsTable td {
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap;
}

#admin-dashboard #bookingsLookupResultsTable th {
  background-color: blue;
  color: #fff;
  font-weight: 600;
}

#admin-dashboard #bookingsLookupResultsTable tr:nth-child(even) {
  background-color: #f9fafb;
}

#admin-dashboard #bookingsLookupResultsTable tr:hover {
  background-color: #eaf4ea;
}

/* Mobile stacked card style */
@media (max-width: 600px) {
  #admin-dashboard #bookingsLookupResultsTable,
  #admin-dashboard #bookingsLookupResultsTable thead,
  #admin-dashboard #bookingsLookupResultsTable tbody,
  #admin-dashboard #bookingsLookupResultsTable th,
  #admin-dashboard #bookingsLookupResultsTable td,
  #admin-dashboard #bookingsLookupResultsTable tr {
    display: block;
    width: 100%;
  }

  #admin-dashboard #bookingsLookupResultsTable thead {
    display: none; /* hide headers */
  }

  #admin-dashboard #bookingsLookupResultsTable tr {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  #admin-dashboard #bookingsLookupResultsTable td {
    padding: 8px;
    text-align: right;
    position: relative;
  }

  #admin-dashboard #bookingsLookupResultsTable td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: 600;
    color: #333;
    text-align: left;
  }
}

/* ===== Admin Sub-Nav ===== */
#admin-subnav {
  background: #fff;              /* solid background, not transparent */
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 60px;                     /* adjust for your main nav */
  z-index: 998;                  /* ensure it's above page content */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;               /* horizontal padding */
  height: 70px;                  /* thicker bar */
}

/* Nav links (desktop) */
#admin-subnav .admin-nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  height: 100%;
  align-items: center;           /* vertically center links */
}

#admin-subnav .admin-nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

#admin-subnav .admin-nav-links a.active {
  color: #007bff;
}

/* Hamburger button */
#subnav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

#subnav-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;       /* thinner bars */
  margin: 3px 0;     /* slightly smaller gap */
  background-color: #333;
  transition: 0.3s;
}

/* Animate into X */
#subnav-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#subnav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
#subnav-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

#admin-dashboard a.copy-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: white;
  text-decoration: none;
}

#admin-dashboard .copy-status {
  display: none;
  font-size: 0.85rem;
  color: green;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #admin-subnav {
    background: #fff;              
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 60px;                     
    z-index: 998;                  
    flex-direction: column;        /* stack hamburger + links */
    align-items: flex-start;
    height: auto;                  /* allow it to expand */
  }

  #subnav-toggle {
    display: flex;
    margin-top: 0;           /* remove extra space */
    align-self: flex-start;  /* align it to the top-left of the subnav */
    padding: 0.4rem 1rem;    /* slightly less padding to lift it */
    margin-left: -1rem;
  }

  #subnav-toggle .bar {
    height: 3px;       /* thin bars */
    margin: 3px 0;     /* small gaps between bars */
  }

  #admin-subnav .admin-nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    background: #fff;              /* fully opaque */
    width: 100%;
    border-top: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: relative;            /* let it expand within the subnav */
  }

  #admin-subnav .admin-nav-links.show {
    display: flex;
  }

  #admin-subnav .admin-nav-links li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    width: 100%;                   /* make clickable area full width */
  }
}

/* User confirmation of successful creation of One-Time discount creation */
.confirmation-message {
    display: none;
    color: #2e7d32; /* Green success color */
    font-weight: 600;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.confirmation-message.show {
    display: inline;
    opacity: 1;
}

/* ============================
   One-Time Discounts Styling
   ============================ */

/* Layout wrapper for input fields */
#oneTimeDiscountsDiv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}

/* Input fields shorter + inline alignment */
#oneTimeDiscountsDiv input[type="text"],
#oneTimeDiscountsDiv input[type="number"] {
  width: 220px;               /* shorter width */
  max-width: 100%;
  display: inline-block;
  margin-right: 10px;
}

/* Place Create Discount button cleanly below inputs */
#oneTimeDiscountsDiv #createOneTimeDiscountBtn {
  margin-top: 5px;
  align-self: flex-start;
}

/* Keep confirmation message aligned beside button */
#oneTimeDiscountsDiv .confirmation-message {
  display: inline-block;
  margin-top: 8px;
  margin-left: 6px;
}

/* Table container: enable horizontal scroll if too wide */
#oneTimeDiscountsTable {
  width: 100%;
  overflow-x: auto;
}

/* General styling consistency for discount sections */
#discountsDiv,
#oneTimeDiscountsDiv {
  background: #fdfdfd;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================
   Mobile Responsiveness
   ============================ */
@media (max-width: 768px) {
  /* Stack inputs vertically */
  #oneTimeDiscountsDiv input[type="text"],
  #oneTimeDiscountsDiv input[type="number"] {
    width: 100%;
    margin-right: 0;
  }

  /* Center button and message */
  #oneTimeDiscountsDiv #createOneTimeDiscountBtn {
    align-self: stretch;
    width: 100%;
  }

  #oneTimeDiscountsDiv .confirmation-message {
    display: block;
    margin-left: 0;
    text-align: center;
  }

  /* Make both discount sections shrink cleanly */
  #discountsDiv,
  #oneTimeDiscountsDiv {
    width: 100%;
    padding: 12px;
  }

  /* Allow tables to scroll horizontally on small screens */
  #oneTimeDiscountsTable table,
  #discountsDiv table {
    width: 100%;
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  #oneTimeDiscountsDiv input,
  #oneTimeDiscountsDiv button {
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  #discountsDiv input,
  #discountsDiv button {
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  #oneTimeDiscountsDiv,
  #discountsDiv {
    box-shadow: none;
    border: 1px solid #eee;
  }
}

/* --- Discounts Section Styling --- */
#discountsDiv {
  width: 100%;
  max-width: 1100px; /* fits nicely across desktop */
  margin: 0 auto;
  padding: 25px 40px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* --- Input row (code + percentage) --- */
#discountsDiv input[type="text"],
#discountsDiv input[type="number"],
#discountsDiv input[type="date"] {
  width: 48%;
  padding: 10px 12px;
  margin: 8px 1%;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

/* --- Date picker layout --- */
#dateSelectionsDiv input[type="date"] {
  width: 48%;
  margin: 8px 1%;
}

/* --- Section label --- */
#discountsDiv p {
  font-weight: 600;
  margin: 18px 0 8px;
  font-size: 16px;
  text-align: center;
}

/* --- Checkbox --- */
#discountsDiv input[type="checkbox"] {
  transform: scale(1.2);
  margin: 8px 0 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* --- Button --- */
#createRecurringDiscountsBtn {
  display: block;
  margin: 15px auto;
  padding: 10px 25px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 16px;
}

#createRecurringDiscountsBtn:hover {
  background-color: #0056b3;
}

/* --- Confirmation Message --- */
.confirmation-message {
  display: none;
  margin-top: 10px;
  color: #28a745;
  font-weight: 600;
  text-align: center;
}

/* --- Table Adjustments --- */
#recurringDiscountsTable {
  margin-top: 25px;
  overflow-x: auto;
}

#recurringDiscountsTable table {
  width: 100%;
  border-collapse: collapse;
}

#recurringDiscountsTable th,
#recurringDiscountsTable td {
  padding: 10px 8px;
  text-align: center;
  font-size: 15px;
}

/* --- Responsive Layout --- */
@media (max-width: 900px) {
  #discountsDiv input[type="text"],
  #discountsDiv input[type="number"],
  #discountsDiv input[type="date"] {
    width: 100%;
    margin: 8px 0;
  }
}

@media (max-width: 600px) {
  #discountsDiv {
    max-width: 95%;
    padding: 20px;
  }

  #discountsDiv p {
    font-size: 14px;
  }

  #createRecurringDiscountsBtn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  #recurringDiscountsTable th,
  #recurringDiscountsTable td {
    font-size: 14px;
    padding: 8px 4px;
  }
}

/* ================================
   My Active Bookings Page Styles
   ================================ */
#my-active-bookings {
    max-width: 1200px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Center table content */
#my-active-bookings table th,
#my-active-bookings table td {
    text-align: center;
    vertical-align: middle; /* also centers content vertically */
}

/* Handle long emails on mobile */
#my-active-bookings table td {
    word-wrap: break-word;      /* legacy support */
    word-break: break-word;     /* modern */
    overflow-wrap: anywhere;    /* lets long strings wrap */
    max-width: 150px;           /* keep column narrow */
    text-overflow: ellipsis;    /* show ... when too long */
    overflow: hidden;
    white-space: nowrap;        /* prevent breaking mid-line */
}

/* Edit Modal */
#my-active-bookings .small-modal, .popup-bookings{
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  overflow-y: auto;
  max-height: 90vh;
}

/* Overlay */
#my-active-bookings .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 999;
}

/* Modal container */
#edit-modal {
  display: flex;
  flex-direction: column;
  align-items: center;   /* centers horizontally */
  justify-content: center; /* centers vertically if modal has height */
  text-align: center;
  padding: 20px;
}

/* Modal title */
#edit-modal h3 {
  margin: 0 0 15px;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Input field */
#edit-modal input {
  width: 80%;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 15px; /* spacing under input */
}

/* Buttons wrapper */
#edit-modal .button-group {
  display: flex;
  gap: 10px;             /* space between buttons */
  justify-content: center;
  margin-top: 10px;
}

/* Buttons */
#edit-modal .btn {
  min-width: 100px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
}

/* Table styling */
#my-active-bookings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#my-active-bookings table th,
#my-active-bookings table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
}

#my-active-bookings table th {
    background-color: blue;
    color: white;
    font-weight: 600;
}

#my-active-bookings table tr:nth-child(even) {
    background-color: #f9fafb;
}

#my-active-bookings table tr:hover {
    background-color: #eaf4ea;
}

#itemList {
    list-style: none;
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
#itemList li {
    border: 1px solid #ddd;
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#itemList button {
    margin-top: 5px;
    background: red;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
}
#itemList button:hover {
    background: darkred;
}

/* Buttons */
#my-active-bookings button {
    background-color: blue;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: 0.3s;
}

#my-active-bookings button:hover {
    background-color: #16a34a;
}

/* Default (desktop/tablet): truncate long emails */
#my-active-bookings table td:nth-child(2) {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
  #my-active-bookings {
      padding: 1rem;
  }

  #my-active-bookings table {
      table-layout: fixed;   /* cells respect max-width */
      width: 100%;
  }

  /* Make action buttons responsive */
  #my-active-bookings table td button {
      max-width: 100%;
      font-size: 0.85rem;       /* shrink text on mobile */
      padding: 6px 10px;        /* smaller padding */
      white-space: nowrap;      /* keeps text on one line */
      text-overflow: ellipsis;  /* adds ... if too long */
      overflow: hidden;
  }

  #my-active-bookings table td:nth-child(2) {
    white-space: normal;       /* allow wrapping */
    word-break: break-word;    /* break long strings */
    overflow-wrap: anywhere;   /* modern wrapping */
    text-overflow: clip;       /* remove ellipsis */
    max-width: 140px;          /* tighter on mobile */
    font-size: 0.85rem;        /* smaller text */
  }

  #my-active-bookings table th,
  #my-active-bookings table td {
      padding: 10px;
      font-size: 0.85rem;
  }
}

/* On very small screens, allow wrapping instead of cutoff */
@media (max-width: 480px) {
    #my-active-bookings table td button {
        white-space: normal;  /* allow wrapping */
        word-break: break-word;
    }
}

/* ================================
   Court Rental Page
   ================================ */
/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #f9fafb;
  color: #111827;
  line-height: 1.6;
}

/* ===== Header ===== */
header {
  background: #0d47a1;
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

/* ===== Rules Section ===== */
.rules {
  margin: 2rem auto;
  max-width: 700px;
  padding: 1rem;
  text-align: center;
}

.rules-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0d47a1;
  text-align: center;
}

/* Center rules section on small screens */
@media (max-width: 768px) {
  .rules {
    margin: 0 auto;
    text-align: center;
  }

  .steps-container {
    align-items: center;   /* centers the step-wedges */
  }

  .step-wedge {
    width: 100%;           /* full width on mobile */
    max-width: 400px;      /* keeps it from being too wide */
    text-align: left;      /* keep inner text readable */
  }
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.step-wedge {
  background: #f1f8ff;
  border-left: 4px solid #0d47a1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-wedge:hover {
  background: #e3f2fd;
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.step-number {
  background: #0d47a1;
  color: #fff;
  font-weight: bold;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-right: 0.6rem;
}

.toggle-icon {
  font-weight: bold;
  font-size: 1rem;
  margin-left: auto;
}

.step-content {
  padding: 0 1rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
  display: none;
  color: #333;
}

.step-wedge.active .step-content {
  display: block;
}

.step-wedge.active .toggle-icon {
  content: "−";
}

/* ===== Facility Layout ===== */
.layout {
  margin: 2rem auto;
  max-width: 800px;
  padding: 1rem;
  text-align: center;
}

.layout h2 {
  color: #0d47a1;
  margin-bottom: 1rem;
}

/* Facility Layout */
.facility-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.court-row {
    display: flex;
    gap: 1rem;
}

.court {
    flex: 1;               /* Make all courts equal width */
    padding: 1.5rem;       /* Adjust height */
    text-align: center;
    background-color: #e5e7eb;
    border: 1px solid #9ca3af;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* ===== Responsive: shrink courts on mobile ===== */
@media (max-width: 768px) {
    .court {
        padding: 1rem;       /* shrink size */
        font-size: 0.9rem;   /* smaller text */
    }

    .court-row {
        gap: 0.5rem;         /* slightly reduce gap */
    }
}

.court:hover {
  background: #bbdefb;
  transform: translateY(-3px);
}

/* ===== Forms ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"] {
  padding: 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

input:focus {
  border-color: #0d47a1;
  outline: none;
}

.btn,
.apply-discount-btn,
.checkout-btn {
  background: #0d47a1;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover,
.apply-discount-btn:hover,
.checkout-btn:hover {
  background: #1565c0;
  transform: translateY(-2px);
}

/* Ensure label and checkbox are inline */
#tokensUsageForm .checkbox-label {
  display: inline-flex;       /* align text and checkbox horizontally */
  align-items: center;        /* vertically center the checkbox with text */
  gap: 0.5rem;                /* spacing between text and checkbox */
  font-weight: 600;
  color: #0d47a1;
  cursor: pointer;            /* makes clicking the text toggle the checkbox */
}

/* Style the checkbox itself */
#activateTokensUsageCheckbox {
  width: 1.2em;
  height: 1.2em;
  cursor: pointer;
}

/* ===== Booking Table ===== */
.table-container {
  max-width: 1000px;  /* match your #admin-dashboard or section width */
  margin: 1.5rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow-x: hidden;
  width: 100%;
  text-align: center;
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;   /* forces equal column widths */
  word-wrap: break-word; /* wrap long text inside cells */
}

/* Main Table */
.booking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

/* ===== Color first column (Time) like header ===== */
/* .booking-table th:first-child,
.booking-table td:first-child {
  background-color: #1e88e5;
  color: #fff;
  font-weight: 600;
  text-align: center;
} */

/* Table cells */
.booking-table td,
.booking-table th {
  padding: 0.8rem;          /* fixed padding for td */
  font-size: 0.95rem;
  text-align: center;
  transition: background 0.2s, color 0.2s; /* only background & color */
}

/* Ensure headers keep original height/padding even when highlighted */
.booking-table th {
  background: linear-gradient(to right, #0d47a1, #1565c0);
  color: #fff;
  font-weight: 600;
  padding: 0.9rem;
  text-align: center;
  white-space: nowrap;
}

/* Table Head */
.booking-table td:first-child {
  background-color: #1565c0;
  color: #fff;
  font-weight: 600;
}

/* Table Cells */
.booking-table td {
  border: 1px solid #e3f2fd;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  transition: background 0.2s, color 0.2s;
}

.booking-table tr:nth-child(even) {
  background: #f9fbff;
}

/* ===== Responsive: Smaller on Phones ===== */
@media (max-width: 768px) {
    .booking-table {
        font-size: 0.75rem;
    }
    .booking-table th,
    .booking-table td {
        font-size: 0.7rem;
        padding: 0.4rem;
        word-break: break-word;
    }
    .booking-table td button {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}

@media (max-width: 480px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .booking-table {
    font-size: 0.65rem;
  }
  .booking-table th,
  .booking-table td {
    font-size: 0.6rem;
    padding: 0.3rem;
  }
  .booking-table td button {
    font-size: 0.6rem;
    padding: 0.3rem;
  }
}

/* Highlighted column (hovered cell + header) */
/* .booking-table th.highlight-column,
.booking-table td.highlight-column {
  background-color: #1565c0;
  color: #fff;
  padding: inherit;
} */

/* Table Buttons */
.booking-table button {
  background: #0d47a1;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9em;      /* scales with table text */
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;   /* keep button label in one line */
}

.booking-table button:hover {
  background: #1565c0;
  transform: scale(1.03);
}

.booking-table button:active {
  transform: scale(0.97);
}

.cart-title {
  display: inline-block;
  margin: 0 auto 1rem auto;
  padding-bottom: 0.25rem;
  border-bottom: 3px solid blue;
  color: #0d47a1;
  font-size: 1.5rem;
}

.cart-section {
  text-align: center;
}

/* Match smaller table sizes on tablets */
@media (max-width: 768px) {
  .booking-table button,
  .cart-section button,
  #discCodeForm .apply-discount-btn,
  .remove-btn {
    transform: none !important;   /* remove all scaling on mobile */
  }

  .booking-table button:hover,
  .booking-table button:active,
  .cart-section button:hover,
  .cart-section button:active,
  #discCodeForm .apply-discount-btn:hover,
  #discCodeForm .apply-discount-btn:active,
  .remove-btn:hover,
  .remove-btn:active {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .booking-table button,
  .cart-section button,
  #discCodeForm .apply-discount-btn,
  .remove-btn {
    padding: 0.3rem 0.7rem; /* a little extra width */
  }
}

/* Buttons inside cells (optional, keep styling consistent) */
.booking-table td button {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  padding: 0.8rem;
  background: #0d47a1;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.1s ease;
}

/* ===== Status Cell Colors ===== */
td.status-closed {
  background: #212121;
  color: #fff;
}

td.status-unavailable {
  background: #9e9e9e;
  color: #fff;
}

td.status-reserved {
  background: #b71c1c;
  color: #fff;
}

/* ===== Button State Colors ===== */
button.add-btn {
  background: #0d47a1;
}

button.added-btn {
  background: #1e88e5;
}

button.reserved-coach-btn {
  background: #6a1b9a;
}

button.reserved-player-btn {
  background: #0277bd;
}

button.add-btn:hover {
  background: #1565c0;
}

button.added-btn:hover {
  background: #2196f3;
}

button.reserved-coach-btn:hover {
  background: #8e24aa;
}

button.reserved-player-btn:hover {
  background: #0288d1;
}

/* ===== Select Your Booking Section ===== */
#datePickerSection,
#booking-section {
  margin: 1.5rem auto;         /* smaller vertical spacing */
  max-width: 600px;            /* narrower width */
  padding: 1rem 1.2rem;        /* reduced padding */
  background: #f9fbff;         /* subtle light blue */
  border: 1px solid #dbeafe;   /* thin border */
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  text-align: center;
}

#datePickerSection h2,
#booking-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0d47a1;
  text-align: center;
}

#datePickerSection form,
#booking-section form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

#datePickerSection input,
#datePickerSection select,
#booking-section input,
#booking-section select {
  width: 100%;
  max-width: 350px;            /* narrower input fields */
  padding: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

#datePickerSection input:focus,
#datePickerSection select:focus,
#booking-section input:focus,
#booking-section select:focus {
  border-color: #0d47a1;
  outline: none;
}

#datePickerSection .btn,
#booking-section .btn {
  margin-top: 0.6rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ==== Cart Section Styles ==== */
.cart-section {
  background-color: #f9fafb;       /* light neutral background */
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  max-width: 1000px;
  margin: 2rem auto;
  overflow-x: auto;                /* allow horizontal scroll on small screens */
  font-family: 'Segoe UI', sans-serif;
}

/* Instruction Text */
.cart-section p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
  text-align: center;
}

/* Cart Table */
.cart-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: center;
}

/* Table Head */
.cart-section th {
  background-color: #0d47a1;
  color: #fff;
  padding: 0.8rem;
  font-weight: 600;
  border: 1px solid #e0e0e0;
}

/* Table Body Cells */
.cart-section td {
  border: 1px solid #e0e0e0;
  padding: 0.7rem;
  color: #333;
}

/* Alternate row colors */
.cart-section tbody tr:nth-child(even) {
  background-color: #f4f6f9;
}

/* Hover effect */
.cart-section tbody tr:hover td {
  background-color: #e3f2fd;
}

/* "No slots added" row styling */
#noUpcomingBookingsRow td {
  font-style: italic;
  color: #999;
  text-align: center;
  padding: 1rem;
}

/* Total cost */
#totalCost {
  font-weight: 700;
  color: #0d47a1;
  text-align: center;
}

/* Buttons inside table */
.cart-section button {
  background-color: #0d47a1;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.cart-section button:hover {
  background-color: #1565c0;
  transform: scale(1.03);
}

.cart-section button:active {
  transform: scale(0.97);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .cart-section {
    padding: 1rem;
  }

  .cart-section h2 {
    font-size: 1.3rem;
  }

  .cart-section p {
    font-size: 0.9rem;
  }

  .cart-section th,
  .cart-section td {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .cart-section button {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .cart-section h2 {
    font-size: 1.1rem;
  }

  .cart-section p {
    font-size: 0.8rem;
  }

  .cart-section th,
  .cart-section td {
    font-size: 0.7rem;
    padding: 0.4rem;
  }

  .cart-section button {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Shared wrapper for discount + tokens */
.discount-or-bnm-section,
#discCodeForm {
  max-width: 500px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  display: flex;
  flex-direction: column;   /* always stack vertically */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

/* Inner container for inputs (optional, keeps spacing clean) */
.discount-or-bnm-section .discount-inner,
#discCodeForm .discount-inner {
  display: flex;
  flex-direction: column;   /* inputs stacked under label */
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* Label styling */
.discount-or-bnm-section label,
#discCodeForm label {
  font-weight: 600;
  color: #0d47a1;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Inputs and buttons styling */
.discount-or-bnm-section input,
#discCodeForm input {
  width: 100%;
  max-width: 300px;
  padding: 0.4rem 0.8rem;
  box-sizing: border-box;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
}

/* Buttons styling */
#discCodeForm .apply-discount-btn {
  background-color: #0d47a1;
  color: #fff;
  border: none;
  cursor: pointer;
}

#discCodeForm .apply-discount-btn:hover {
  background-color: #1565c0;
}

/* Responsive adjustments (optional) */
@media (max-width: 479px) {
  .discount-or-bnm-section input,
  #discCodeForm input {
    max-width: 100%;
  }
}

.checkout-section {
  max-width: 500px;
  margin: 0 auto 2rem auto; /* centered like discount section */
  padding: 1.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.confirmation-label {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.confirmation-label a {
  color: #0d47a1;
  text-decoration: underline;
  font-weight: 500;
}

.confirmation-label input[type="checkbox"] {
  margin-left: 0.5rem; /* keeps it right after the link */
  vertical-align: middle; /* aligns checkbox with text baseline */
}

.checkout-btn[disabled] {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* .court-row {
    flex-direction: column;
  } */

  .court {
    min-width: auto;
  }

  .booking-table th,
  .booking-table td,
  .summary-table th,
  .summary-table td {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  header h1 {
    font-size: 1.4rem;
  }
}

/* Contact Confirmation Page */
#contact-confirmation {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.confirmation-box {
    background: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.confirmation-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2563eb; /* blue tone */
}

.confirmation-box p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: #374151;
}

.btn-home {
    display: inline-block;
    background: #2563eb;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-home:hover {
    background: #1d4ed8;
}

/* ===== Guest Login (for users not logged in) ===== */
#guest-login {
  margin: 2rem auto;
  max-width: 600px;
  padding: 1.5rem;
}

.guest-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}

.guest-box h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0d47a1;
  margin-bottom: 0.5rem;
}

.guest-box a {
  color: #1565c0;
  text-decoration: none;
  font-weight: 500;
}

.guest-box a:hover {
  text-decoration: underline;
}

.guest-box .note {
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 1rem;
}

/* Form spacing */
#guest-login form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

#guest-login input[type="text"],
#guest-login input[type="email"] {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#guest-login input:focus {
  border-color: #0d47a1;
  box-shadow: 0 0 0 2px rgba(13,71,161,0.2);
  outline: none;
}

#guest-login .btn {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  font-size: 1rem;
}

/* Error labels */
.error-msg {
  font-size: 0.85rem;
  color: #dc2626;
  margin-top: -0.3rem;
  text-align: left;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .guest-box {
    padding: 1.2rem;
  }

  .guest-box h2 {
    font-size: 1.2rem;
  }

  #guest-login input,
  #guest-login .btn {
    font-size: 0.9rem;
    padding: 0.6rem;
  }
}

/* Remove Button */
.remove-btn {
  background: #dc2626; /* red-600 */
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.remove-btn:hover {
  background: #b91c1c; /* red-700 */
  transform: translateY(-2px);
}

.remove-btn:active {
  background: #991b1b; /* red-800 */
  transform: scale(0.96);
}

.remove-btn:disabled {
  background: #fca5a5; /* red-300 */
  cursor: not-allowed;
  box-shadow: none;
}

/* Highlight table cells when hovering over courts */
td.cell-highlight,
th.cell-highlight {
    filter: brightness(70%);
}

/* Password Reset Page Container */
.password-reset-container {
    max-width: 400px;
    margin: 8vh auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    font-family: system-ui, sans-serif;
}

/* Title */
.password-reset-container h1 {
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #222;
}

/* Labels */
form label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Inputs */
form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    margin-bottom: 1.2rem;
    transition: border-color 0.25s ease;
}

form input[type="password"]:focus {
    border-color: #0d47a1; /* matches your theme color */
    box-shadow: 0 0 0 3px rgba(13,71,161,0.15);
}

/* Submit button */
.cta-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    background: #0d47a1;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.1s ease;
}

.cta-btn:hover {
    background: #1565c0;
}

.cta-btn:active {
    transform: scale(0.98);
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .password-reset-container {
        margin: 4vh 1rem;
        padding: 1.5rem;
    }

    .password-reset-container h1 {
        font-size: 1.4rem;
    }
}

/* Password strength container */
#passwordStrength {
    margin-top: -0.8rem;
    margin-bottom: 1.2rem;
}

/* Strength bar */
#passwordStrength .strength-bar {
    height: 6px;
    border-radius: 4px;
    background: #ccc;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

/* Strength text */
#passwordStrength .strength-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.3rem;
    color: #555;
}

/* Weak */
#passwordStrength.weak .strength-bar {
    width: 33%;
    background: #e53935;
}
#passwordStrength.weak .strength-text {
    color: #e53935;
}

/* Medium */
#passwordStrength.medium .strength-bar {
    width: 66%;
    background: #fbc02d;
}
#passwordStrength.medium .strength-text {
    color: #fbc02d;
}

/* Strong */
#passwordStrength.strong .strength-bar {
    width: 100%;
    background: #43a047;
}
#passwordStrength.strong .strength-text {
    color: #43a047;
}

/* Wedge container for user inactivity warning */
#inactivity-wedge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff3cd;       /* light warning yellow */
    border: 1px solid #ffeeba;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 280px;
    font-family: sans-serif;
    font-size: 14px;
    color: #856404;
    display: flex;
    flex-direction: column;
    gap: 10px;

    /* Animation start state */
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none; /* disable click when hidden */

    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

/* Show wedge */
#inactivity-wedge.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Button styling */
#inactivity-wedge button {
    background-color: #ffc107; /* amber */
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #212529;
    transition: background-color 0.2s;
}

#inactivity-wedge button:hover {
    background-color: #e0a800;
}

#idle-countdown {
    font-weight: bold;
    color: #856404;
}

/* Force white background for "No Discounts Available" rows */
#admin-dashboard table tr.no-discounts td {
  background-color: #fff !important;
  color: #555 !important;
  text-align: center;
  font-style: italic;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  box-shadow: none !important;
}

#admin-dashboard table tr.no-discounts:hover td {
  background-color: #fff !important;
}

/* =========================================
   Improved Mobile-Friendly Court Table
   ========================================= */

/* Light gray transparency for header row and time column */
.booking-table th,
.booking-table td:first-child {
  background: #e3f2fd; /* soft light blue */
  color: #0d47a1; /* same deep blue tone as buttons */
  font-weight: 600;
}

/* Make sure buttons stay the visual focus */
.booking-table td button {
  z-index: 1;
  position: relative;
  background: #0d47a1;
  border-radius: 0.4rem;
  font-weight: 500;
}

/* Responsive scaling for smaller screens */
@media (max-width: 768px) {
  .booking-table {
    font-size: 0.8rem;
  }

  .booking-table th,
  .booking-table td {
    padding: 0.4rem;
    font-size: 0.75rem;
  }

  .booking-table td button {
    font-size: 0.75rem;
    padding: 0.45rem;
  }
}

@media (max-width: 480px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .booking-table {
    font-size: 0.7rem;
  }

  .booking-table th,
  .booking-table td {
    padding: 0.3rem;
    font-size: 0.65rem;
  }

  .booking-table td button {
    font-size: 0.7rem;
    padding: 0.4rem;
  }

  /* Slightly fade the gray on extra small screens */
  .booking-table th,
  .booking-table td:first-child {
    background: rgba(245, 245, 245, 0.5) !important;
  }
}

/* Maintain consistent look across all sizes */
.booking-table tr:nth-child(even) {
  background: #fdfdfd;
}