/* -------------------------------------------- */
/*               CourtMate Custom Styles             */
/* -------------------------------------------- */

/* General Layout */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  position: relative;
  padding-bottom: 100px; /* space for footer */
  /*background: url('../image/kfun-background.png') no-repeat center center fixed;*/
  background: url('../image/new-background.png') no-repeat center center scroll;
  background-size: cover;
  color: #2f2347;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* -------------------------------------------- */
/* Navbar */
/* -------------------------------------------- */
.custom-navbar {
  background-color: #efe5ff;
  padding: 10px 30px;
  border-bottom: 1px solid #ddcdf8;
  box-shadow: 0 6px 16px rgba(123, 74, 226, 0.12);
}

.navbar-custom {
  background-color: #efe5ff;
  padding: 10px 30px;
  border-bottom: 1px solid #ddcdf8;
  box-shadow: 0 6px 16px rgba(123, 74, 226, 0.12);
}

.navbar-toggler {
  border-color: #d8c4f8;
  background-color: #ffffff;
}

.logo-purple {
  color: #8b5cf6 !important;
  font-size: 1.5rem;
  text-shadow: 0 0 4px rgba(139, 92, 246, 0.35);
}

.navbar-nav .nav-link {
  color: #2f2347 !important;
  margin-left: 20px;
  font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #7c3aed !important;
  text-decoration: none;
  font-weight: bold;
}

.navbar-nav .nav-link.active-link {
  color: #7c3aed !important;
  font-weight: 700;
}

/* -------------------------------------------- */
/* Typography */
/* -------------------------------------------- */
h1, h2, h3, h4, h5 {
  color: #2f2347 !important;
}

body:not(.admin-page) p,
body:not(.admin-page) span,
body:not(.admin-page) label {
  color: #3f2f60 !important;
}


.text-purple {
  color: #8b5cf6 !important;
}

/* -------------------------------------------- */
/* Hero Section */
/* -------------------------------------------- */
.hero-section {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 80px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  color: #8b5cf6;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #6f5f92;
  margin-top: 10px;
}

.hero-btn {
  margin-top: 20px;
  padding: 12px 20px;
  font-size: 1.1rem;
  background-color: #8b5cf6;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 40px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
  transition: 0.3s ease;
  text-shadow: 0 0 5px #fff;
}

.hero-btn:hover {
  background-color: #7c3aed;
  transform: scale(1.05);
}

/* -------------------------------------------- */
/* Room Display */
/* -------------------------------------------- */
.room-thumb {
  width: 100%;
  max-width: 250px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(139, 92, 246, 0.28);
  transition: transform 0.3s;
  margin-bottom: 12px;
}

.room-thumb:hover {
  transform: scale(1.05);
}

.room-label {
  margin-top: 5px;
  color: #3f2f60;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.room-images {
  margin-top: 120px;
}

/* -------------------------------------------- */
/* Booking Forms */
/* -------------------------------------------- */
.room-details-container,
.edit-booking-container {
  max-width: 600px;
  margin: 80px auto;
  background-color: #f6f0ff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.22);
}

.form-label {
  color: #463468;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-control, .form-select {
  background-color: #ffffff;
  color: #000000;
}

.form-container {
    width: 100%;
    max-width: 450px; /* ✅ Adjusted width: balanced */
    margin: 50px auto;
    padding: 30px;
    background: #f6f0ff;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.22);
}

.form-container.login-box {
  background: linear-gradient(180deg, #ffffff 0%, #f4ecff 100%) !important;
  border: 2px solid #d9c2ff !important;
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.2);
}

.login-box {
  color: #2f2347;
}

.login-box .card-title {
  color: #6d3bcc !important;
  text-shadow: none;
}

.login-box .form-label {
  color: #3e2b62 !important;
  font-weight: 600;
}

.login-box .form-control {
  background-color: #ffffff;
  color: #2f2347;
  border: 1px solid #cfb6f5;
}

.login-box .form-control::placeholder {
  color: #7b6b9b;
}

.login-box .form-control:focus {
  color: #2f2347;
  background-color: #ffffff;
  border-color: #a67af0;
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.2);
}

.login-box .login-hint {
  text-align: center;
  margin-top: 10px;
  color: #4a3a6a !important;
}

.login-box .login-link {
  color: #6d3bcc;
  font-weight: 600;
  text-decoration: none;
}

.login-box .login-link:hover {
  color: #5a2eb1;
  text-decoration: underline;
}

.login-box .error {
  color: #b42318;
  font-weight: 600;
}

.login-box .success {
  color: #067647;
  font-weight: 600;
}


.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding-top: 30px;
    padding-bottom: 20px;
  }

  .room-images {
    margin-top: 30px;
  }

  .room-images .row {
    row-gap: 18px;
  }

  .room-images .col-md-4 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .room-thumb {
    max-width: 100%;
    width: 100%;
  }
}

/* -------------------------------------------- */
/* Mobile Responsive Adjustments */
/* -------------------------------------------- */
@media (max-width: 768px) {
  .custom-navbar,
  .navbar-custom {
    padding: 10px 16px;
  }

  .navbar-nav {
    margin-top: 10px;
    gap: 8px;
  }

  .navbar-nav .nav-link {
    margin-left: 0;
    display: block;
    padding: 8px 0;
  }

  .hero-section {
    padding-top: 40px;
    padding-bottom: 50px;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-top: 8px;
  }

  .hero-btn {
    width: 100%;
    max-width: 320px;
  }

  .room-thumb {
    max-width: 100%;
    margin: 0 auto 16px;
  }

  .room-details-container,
  .edit-booking-container,
  .form-container {
    width: calc(100% - 24px);
    max-width: 100%;
    margin: 24px auto;
    padding: 22px;
  }

  .form-container {
    margin: 24px auto;
    padding: 22px;
  }

  .form-control,
  .form-select,
  .btn-purple,
  .login-link,
  .form-container button[type="button"],
  .form-container button[type="submit"] {
    width: 100%;
  }

  .form-container button[type="button"],
  .form-container button[type="submit"] {
    margin-bottom: 10px;
  }

  .form-container > div[style] {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .custom-navbar,
  .navbar-custom {
    padding: 10px 12px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-btn {
    font-size: 1rem;
    padding: 10px 16px;
  }

  .form-container {
    padding: 18px;
  }

  .room-details-container,
  .edit-booking-container {
    padding: 18px;
  }
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.form-container button {
    width: 100%;
    padding: 10px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-container button:hover {
    background: #0056b3;
}

.form-container .error {
    color: red;
    margin-top: 10px;
    text-align: center;
}

.form-container .success {
    color: green;
    margin-top: 10px;
    text-align: center;
}

.room-details-title,
h3.page-heading {
  text-align: center;
  font-size: 2.2rem;
  color: #2f2347;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #6f5f92;
  margin-bottom: 30px;
}

.room-name {
  color: #7c3aed;
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(139, 92, 246, 0.28);
  margin-bottom: 10px;
  text-align: center;
}

.room-meta {
  color: #3f2f60;
  text-align: left;
}

/* -------------------------------------------- */
/* Booking Confirmation (Dark Purple Alert) */
/* -------------------------------------------- */

 .alert-success {
  background-color: #f3ecff !important;
  border-left: 5px solid #8b5cf6;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
  color: #352651 !important;
}

/* Headings inside confirmation box */
.alert-success h4 {
  color: #7c3aed !important;
  font-weight: bold;
  margin-bottom: 15px;
}

/* Text inside confirmation box */
.alert-success p,
.alert-success strong {
  color: #352651 !important;
}


/* -------------------------------------------- */
/* Buttons */
/* -------------------------------------------- */
.btn-purple {
  background-color: #8b5cf6 !important;
  color: white !important;
  border: none !important;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 500;
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.35);
  text-decoration: none !important;
  display: inline-block; /* ✅ force behave more like button */
}


.btn-purple:hover {
  background-color: #7c3aed !important;
  transform: scale(1.05);
}

.btn-edit {
  background-color: #8b5cf6;
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 500;
  box-shadow: 0 8px 14px rgba(139, 92, 246, 0.28);
  transition: 0.3s ease;
}

.btn-edit:hover {
  background-color: #7c3aed;
  transform: scale(1.05);
}

.btn-cancel {
  background-color: #ff4d6d !important;
  color: white !important;
  border: none;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.4);
  transition: 0.3s ease;
}

.btn-cancel:hover {
  background-color: #e60039;
  transform: scale(1.05);
}

.card {
  background-color: #f7f2ff !important;
  border: 1px solid #e4d7fa !important;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
  color: #352651 !important;
}

.card-title {
  color: #7c3aed !important;
  font-weight: bold;
  margin-top: 15px;
  text-align: center;
}

.card-text {
  color: #665581 !important;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* -------------------------------------------- */
/* Tables */
/* -------------------------------------------- */
.table th,
.table td {
  color: #352651 !important;
}

/*.table {
  background-color: white;
}

.table th {
  background-color: #2a2b3c;
  color: #8b5cf6 !important;
}

.table td {
  background-color: #fdfaff;
  border-color: #eadfff;
}

.alert-info {
  background-color: #f0e6ff;
  border-left: 5px solid #8b5cf6;
  color: #e0e0e0;
}*/

/* ------- Admin Dashboard (roomList.jsp) Specific ------- */

.section-title {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
  color: #5b3f98;
  text-shadow: none;
  background-color: #f4edff;
  border: 1px solid #deccfa;
  border-radius: 14px;
  padding: 12px 16px;
}

.room-img {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.card {
    border: none;
    background-color: #f7f2ff !important;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
    color: #352651 !important;
    transition: transform 0.3s;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.26);
}

.badge-vip {
    background-color: #e60039;
}

.badge-standard {
    background-color: #6f42c1;
}

.badge-family {
    background-color: #20c997;
}

/* Global replacement for gray Bootstrap secondary badge */
.badge.bg-secondary,
.badge.text-bg-secondary {
  background-color: #efe4ff !important;
  color: #5f35b3 !important;
  border: 1px solid #d8c1fb;
}

/* Soft status palette for Available / Not Available / Booked */
.badge.bg-success,
.badge.text-bg-success {
  background-color: #def7e8 !important;
  color: #1f7a49 !important;
  border: 1px solid #b8eacb;
}

.badge.bg-danger,
.badge.text-bg-danger {
  background-color: #ffe3ec !important;
  color: #a63a62 !important;
  border: 1px solid #f8bfd2;
}

.text-success {
  color: #3e9164 !important;
}

.text-danger {
  color: #b84f76 !important;
}

.room-details {
    font-size: 0.95rem;
  color: #665581;
}

.room-details-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #7c3aed;
    text-shadow: 0 0 6px rgba(139, 92, 246, 0.24);
    margin-bottom: 20px;
}

.details-container {
  background-color: #f7f2ff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
    padding: 30px;
    max-width: 600px;
    margin: 0px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    color: #352651;
}

.detail-label {
  color: #665581;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #352651;
    margin-bottom: 15px;
    display: block;
}

.room-card {
  background-color: #f7f2ff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
    color: #352651;
    transition: transform 0.3s;
}

.room-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.26);
}

.section-title {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 2rem;
  color: #5b3f98;
  text-shadow: none;
  background-color: #f4edff;
  border: 1px solid #deccfa;
  border-radius: 14px;
  padding: 12px 16px;
    margin-bottom: 20px;
}

.booking-card-container {
      display: flex;
      flex-wrap: nowrap;
      overflow-x: auto;
      gap: 20px;
      padding: 20px 0;
        }

    /* Vertical list variant used on My Bookings page */
    .booking-list-container {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 12px 0;
    }

    .booking-section {
      margin-top: 28px;
      padding: 22px;
      border-radius: 22px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(247, 242, 255, 0.96) 100%);
      border: 1px solid rgba(139, 92, 246, 0.14);
      box-shadow: 0 16px 36px rgba(139, 92, 246, 0.12);
      backdrop-filter: blur(8px);
      text-align: left;
    }

    .booking-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }

    .booking-section-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #8b5cf6;
      margin-bottom: 6px;
    }

    .booking-section h3 {
      margin: 0;
      font-size: 1.4rem;
      color: #2f2347 !important;
    }

    .booking-hero-badge,
    .booking-count-badge,
    .booking-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      font-weight: 700;
      letter-spacing: 0.01em;
      white-space: nowrap;
    }

    .booking-hero-badge {
      margin-bottom: 14px;
      padding: 8px 14px;
      background: rgba(139, 92, 246, 0.12);
      color: #6d3bcc;
      border: 1px solid rgba(139, 92, 246, 0.18);
      font-size: 0.82rem;
    }

    .booking-count-badge {
      padding: 8px 14px;
      background: #ffffff;
      color: #6d3bcc;
      border: 1px solid rgba(139, 92, 246, 0.16);
      box-shadow: 0 8px 18px rgba(139, 92, 246, 0.08);
      font-size: 0.82rem;
    }

    .booking-count-muted {
      color: #7b6b9b;
    }

    .booking-grid-upcoming,
    .booking-grid-history {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      padding-top: 14px;
    }

    .booking-card-upcoming {
      border: 1px solid rgba(139, 92, 246, 0.2);
      background: linear-gradient(180deg, #ffffff 0%, #f8f3ff 100%);
    }

    .booking-card-history {
      border: 1px solid rgba(150, 128, 175, 0.16);
      background: linear-gradient(180deg, #fffdf8 0%, #f8f4ff 100%);
      opacity: 0.96;
    }

    .booking-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .booking-card-type {
      margin: 3px 0 0;
      color: #6f5f92;
      font-size: 0.92rem;
    }

    .booking-card-details p {
      margin-bottom: 0.45rem;
    }

    .booking-status {
      padding: 7px 12px;
      font-size: 0.78rem;
      border: 1px solid transparent;
    }

    .booking-status-upcoming {
      background: rgba(34, 197, 94, 0.12);
      color: #15803d;
      border-color: rgba(34, 197, 94, 0.2);
    }

    .booking-status-past {
      background: rgba(148, 163, 184, 0.16);
      color: #475569;
      border-color: rgba(148, 163, 184, 0.22);
    }

    .booking-empty-state {
      margin-top: 16px;
      padding: 18px 20px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.72);
      border: 1px dashed rgba(139, 92, 246, 0.24);
      color: #6f5f92;
      font-weight: 500;
      text-align: center;
    }

        .booking-card-container::-webkit-scrollbar {
            height: 6px;
        }

        .booking-card-container::-webkit-scrollbar-thumb {
          background-color: #8b5cf6;
            border-radius: 10px;
        }

        .booking-card {
            min-width: 300px;
          background-color: #f7f2ff;
          color: #352651;
            border-radius: 16px;
          box-shadow: 0 8px 16px rgba(139, 92, 246, 0.18);
            padding: 20px;
        }

        .booking-card h5 {
          color: #7c3aed;
            margin-bottom: 10px;
        }

        .btn-edit, .btn-cancel {
            margin-right: 8px;
        }
        
        .profile-container {
            max-width: 600px;
            margin: 100px auto;
            padding: 30px;
          background-color: #f7f2ff;
            border-radius: 16px;
          box-shadow: 0 10px 24px rgba(139, 92, 246, 0.2);
          color: #352651;
        }
        .profile-container h2 {
            text-align: center;
          color: #7c3aed;
        }
        .profile-container p {
            font-size: 1.1rem;
            margin-bottom: 10px;
        }

/* Fix text color inside admin tables */
.admin-table,
.admin-table table,
.admin-table th,
.admin-table td {
    color: #212529 !important; /* Bootstrap default dark */
}

/* Force readable text in admin booking table */
.admin-table table,
.admin-table tbody td {
    color: #212529 !important;
}

/* ===== ADMIN BOOKING TABLE TEXT FIX ===== */
.admin-table table {
    background-color: #ffffff;
}

.admin-table thead th {
    background-color: #212529 !important;
    color: #ffffff !important;
}

.admin-table tbody td {
    color: #212529 !important; /* DARK TEXT */
    background-color: #ffffff !important;
}

/* -------------------------------------------- */
/* Admin Page Background & Table Container */
/* -------------------------------------------- */

.admin-page {
    min-height: 100vh;
}

/* White container so table stays readable */
.admin-table {
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 30px;
}

.admin-table {
  background: rgba(188, 160, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 30px;
}

        
/* -------------------------------------------- */
/* Footer */
/* -------------------------------------------- */
.footer-custom {
  background: linear-gradient(90deg, #efe5ff, #e6d8ff);
  color: #2f2347;
    padding: 40px 0;
    margin-top: 80px;
    font-size: 14px;
}

.footer-custom h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    margin-bottom: 20px;
    color: #7c3aed;
    text-shadow: 0 0 4px rgba(139, 92, 246, 0.24);
}

.footer-custom p,
.footer-custom a,
.footer-custom li {
  color: #5d4a7d;
}

.footer-custom a:hover {
  color: #2f2347;
    text-decoration: underline;
}

.social-icons i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #8b5cf6;
    transition: transform 0.3s;
}

.social-icons i:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 20px;
    text-align: center;
    color: #aaa;
}

/* Fix all anchor tag buttons to remove underline */
a.btn, a.btn-purple, a.btn-edit, a.btn-cancel {
    text-decoration: none !important;
}

/* Fix anchor tag color inheritance issue */
a.btn-purple, a.btn-edit, a.btn-cancel {
    color: white !important;
}