.bat-custom-modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  backdrop-filter: blur(20px);
  z-index: 9999;
  background-color: rgba(38, 4, 48, 0.9) !important;

  overflow-y: auto;
  padding: 10px;
}
.ep-modal {
}
/* --- Main Modal Content Box --- */
/* This is the white box that holds all the ticket information */
/* .bat-custom-modal .ticket-modal-content {
  max-width: 1050px;
  width: 100%;
  background-color: rgba(38, 4, 48, 0.4) !important;
  border-radius: 20px;
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  padding: 35px 30px;
  color: #fff;
  max-height: calc(100vh - 40px);
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none; 
} */

/* This is now the main, NON-scrolling container */
.bat-custom-modal .ticket-modal-content {
  max-width: 1050px;
  width: 100%;
  background-color: rgba(38, 4, 48, 0.4) !important;
  border-radius: 20px;
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  color: #fff;
  max-height: calc(100vh - 40px); /* Keep this here! */
  position: relative; /* Keep this here! */
  padding: 0; /* Move padding to the inner wrapper */
}

/* This new class handles the scrolling */
.modal-scroll-wrapper {
  flex-grow: 1;
  overflow-y: auto; /* The scrolling now happens here */
  padding: 35px 15px; /* Fix */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.bat-custom-modal .ticket-modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}
/* =================================================================== */
/* 2. MODAL CONTENT STYLING
/* =================================================================== */

#ticket-modal-title {
  margin-top: 0;
  text-align: center;
  font-size: 3.5em;
  font-weight: normal;
  margin-bottom: 30px;
  color: #fff;
}

/* --- Ticket Cards Grid --- */
.bat-custom-modal .ticket-cards-grid {
  display: grid;
  /* This is a great responsive solution, no changes needed */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 25px;
  margin-bottom: 10px;
}

.bat-custom-modal .ticket-option-card {
  background: transparent;
  border: 1px solid #9d8ea0;
  border-radius: 14px;
  text-align: center;
  padding: 10px 15px;
  transition: all 0.3s ease;
  display: flex; /* Use flexbox for better internal alignment */
  flex-direction: column;
}

.bat-custom-modal .ticket-option-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #a512c4;
}

.bat-custom-modal .ticket-card-header {
  flex-grow: 1; /* Pushes the price/quantity to the bottom */
}

.bat-custom-modal .ticket-number-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  background-color: #a512c4;
  color: #fff;
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 10px;
}

.bat-custom-modal .ticket-card-header h4 {
  font-size: 1.5em;
  font-weight: normal;
  margin: 0 0 5px;
  color: #fff;

  /* Fix overflow issues */
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.bat-custom-modal .ticket-card-header p {
  font-size: 0.85em;
  color: #bbb;
  margin: 0 0 15px;

  /* Fix overflow issues */
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-overflow: ellipsis;
}

.bat-custom-modal .ticket-price {
  font-weight: normal;
  font-size: 1.4em;
  color: #fff;
  margin-bottom: 12px;
}
.ticket_minus {
  border-right: 1px solid #f4f4f5 !important;
}
.ticket_plus {
  border-left: 1px solid #f4f4f5 !important;
}
.bat-custom-modal .ticket-quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f4f4f5;
  border-radius: 8px;
  width: 110px;
  margin: 0 auto;
}

.bat-custom-modal .quantity-btn {
  border: none;
  background: none;
  font-size: 1.6em;
  color: #fff;
  cursor: pointer;
  padding: 5px 12px;
}

.bat-custom-modal input.ticket-quantity-input {
  width: 45px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 1.5em;
  font-weight: normal;
  color: #fff;
}

.bat-custom-modal input.ticket-quantity-input::-webkit-outer-spin-button,
.bat-custom-modal input.ticket-quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bat-custom-modal input.ticket-quantity-input {
  -moz-appearance: textfield;
}

.bat-custom-modal .booking-summary {
  margin: 15px auto;
  max-width: 500px;
  width: 100%;
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
}

.bat-custom-modal .summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.5em;
  margin-bottom: 8px;
  color: white;
}

.bat-custom-modal .summary-row.total-row {
  font-size: 2em;
  font-weight: normal;
  color: #fff;
  margin-top: 12px;
}

.bat-custom-modal .modal-actions {
  margin: 25px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 500px;
}

.bat-custom-modal .modal-button-primary,
.bat-custom-modal .modal-button-secondary,
/* ls checkout btn styles */
.bat-custom-modal #ep_ls_single_event_checkout_btn,
.bat-custom-modal #ep_event_ticket_modal_right > div.ep-mt-3 > a > button {
  padding: 12px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  width: 100%;
}

.bat-custom-modal .modal-button-primary,
/* ls checkout btn styles */
.bat-custom-modal #ep_ls_single_event_checkout_btn {
  color: #fff;
  background: linear-gradient(to right, #a512c4 0%, #aa34c3 40%, #4f095e 100%);
  border: 2px solid #f239f6 !important;
  border-radius: 5px;
  text-align: center !important;
  font-size: 1.25em;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
}

.bat-custom-modal .modal-button-primary:hover {
  transform: translate(0, -4px);
}

.bat-custom-modal .modal-button-secondary,
/* ls checkout btn styles */
.bat-custom-modal #ep_event_ticket_modal_right > div.ep-mt-3 > a > button {
  background: transparent;
  font-size: 1.25em;
  font-weight: 400;
  border: 2px solid #72347f !important;
  color: #fff;
  transition: all 0.3s ease;
}
/* .bat-custom-modal .modal-button-secondary:hover {
  transform: translate(0, -4px);
} */

/* =================================================================== */
/* 3. RESPONSIVE ADJUSTMENTS
/* =================================================================== */

@media (max-width: 768px) {
  #ticket-modal-title {
    font-size: 2.5em;
  }
  .bat-custom-modal .ticket-modal-content {
    padding: 25px 20px;
  }
  .bat-custom-modal .summary-row {
    font-size: 1.2em;
  }
  .bat-custom-modal .summary-row.total-row {
    font-size: 1.75em;
  }
}

@media (max-width: 390px) {
  .bat-custom-modal .ticket-card-header h4 {
    font-size: 1.25em;
  }
}

@media (max-width: 600px) {
  #ticket-modal-title {
    font-size: 1.75rem;
  }
  .bat-custom-modal .ticket-modal-content {
    padding: 20px 15px;
  }
  .bat-custom-modal .ticket-cards-grid {
    gap: 15px;
  }
  .bat-custom-modal .ticket-option-card {
    padding: 15px;
  }
}

/* =================================================================== */
/* 4. UTILITY & OVERRIDE STYLES
/* =================================================================== */

body.ep-modal-open-body {
  overflow: hidden;
}

.ep-text-muted {
  color: white !important;
}

.bat-divider {
  border: none;
  border-top: 1px solid #583d5e;
}

/* These styles from your original file hide unnecessary elements from the plugin */
.ep-ticket-bookingfee-row-actual,
#ep_single_ticket97_subtotal,
#ep_single_ticket97_offer_value,
.d-none {
  display: none !important;
}

.bat-custom-modal #ep_event_booking_ticket {
  color: #ffffff !important;
}

#ep_event_booking_ticket {
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid #583d5e;
}

.ep-single-modal-ticket-row {
  display: flex !important;
}

.bat-custom-modal .ep-single-modal-ticket-row {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 1em;
  padding: 4px 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
}

/* This targets the left side Gold x 10 */
.bat-custom-modal .ep-single-modal-ticket-row .ep-box-col-6:first-child {
  text-align: left !important;
}

/* This targets the right side $amt */
.bat-custom-modal .ep-single-modal-ticket-row .ep-text-end {
  text-align: right !important;
  font-weight: 400 !important;
  color: #fff !important;
}

/* This hides all the unnecessary extra text and elements within each row */
.bat-custom-modal .ep-single-modal-ticket-row .ep-text-small,
.bat-custom-modal .ep-single-modal-ticket-row .d-none {
  display: none !important;
}

/* Hot Fix: allow scrolling properly on small screens */
@media (max-width: 768px) {
  .bat-custom-modal {
    align-items: flex-start; /* Start from top instead of center */
    padding-top: 20px; /* Optional: spacing from top */
    padding-bottom: 20px; /* Optional: spacing from bottom */
  }

  .bat-custom-modal .ticket-modal-content {
    /* Allow one way scroll in mobile */
    max-height: fit-content;
    overflow-y: auto; /* Allow internal scroll if content exceeds */
  }
}
.ep-ticket-unavailable-message {
  border: 1px solid #9d8ea0;
  border-radius: 14px;
  background: #3f044c;
  padding: 5px;
  color: white;
}

/* TODO: Fix it later */
/* .modal-button-disabled {
  background: grey !important;
  border: 2px solid grey !important;
  cursor: not-allowed !important;
} */
.ticket-modal-content {
  position: relative;
  z-index: 10000;
}
.ep-modal-overlay {
  z-index: 9999;
}

/* --- Live Seating Loader Styles (Updated for Full Coverage) (NEW)--- */

/* This is the container for the modal's content */
#ep-event-ticket-checkout-modal .ticket-modal-content {
  position: relative; /* Establishes the boundary for the loader */
  min-height: 300px; /* Ensures container has a minimum height even before content loads */
}
.ep-seat-col .ep_ls_event_ticket_seat svg {
  cursor: pointer;
}
/* This is the loader overlay itself */
#ep-event-ticket-checkout-modal .ep-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  z-index: 999;
  cursor: auto;
  width: 100%;
  height: 100%;
  background: #3f044c20;
}

/* The spinning circle */
#ep-event-ticket-checkout-modal .ep-spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #e0e0e0;
  border-top: 6px solid #db30ff; /* Accent color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
/* live seating front styles */

/* =================================================================== */
/* FINAL V5: Booking Summary Definitive Fix
/* This replaces the V4 block and solves the ticket breakdown issue.
/* =================================================================== */

.bat-custom-modal .ep-single-modal-ticket-row {
  margin: 0 auto !important;
  max-width: 500px !important;
  width: 100% !important;
  border-top: 1px dashed rgba(255, 255, 255, 0.25) !important;
}

/* --- 1. Style the main container for each ticket row --- */
.ep-single-modal-ticket-row {
  display: flex !important;
  justify-content: space-between !important;
  flex-wrap: wrap; /* Ensures proper wrapping if needed */
  align-items: center;
  width: 100%;
  padding: 12px 0 !important;
  margin: 0 !important;
  font-size: 1.2em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Subtle separator */
}

/* --- 2. THE CRITICAL FIX: Hide the unwanted parts of the row --- */
/* This targets the 3rd, 4th, 5th, and 6th boxes (Seats & Subtotal) inside each ticket row and hides them. */
.ep-single-modal-ticket-row > div:nth-child(n + 3) {
  display: none !important;
}

/* --- 3. Style the remaining two boxes (Name/Qty and Price) --- */
.ep-single-modal-ticket-row .ep-box-col-6 {
  padding: 0;
  margin: 0;
  flex-basis: 50%; /* Each takes up half the space */
}
.ep-single-modal-ticket-row .ep-text-end {
  text-align: right; /* Ensures the price is pushed to the far right */
}

/* --- 4. Style the "Total" and "Fee" rows --- */
#ep_event_ticket_modal_right_fixed_fee,
#ep_event_ticket_modal_right_total {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  width: 100%;
  padding: 12px 0;
  margin: 0 !important;
  font-size: 1.2em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#ep_event_ticket_modal_right_total {
  font-size: 1.75em;
  font-weight: bold;
  border-bottom: none;
  padding-top: 15px;
}

/* --- 5. Container Cleanup --- */
#ep_event_ticket_modal_right .ep-text-small.ep-my-2 {
  /* padding: 0 !important; */
  border: none !important;
  width: 100%;
}

/* --- Styling for the new, clean ticket summary list --- */

/* This replaces the old .ep-single-modal-ticket-row style */
#ep_event_booking_ticket .ep-single-modal-ticket-row {
  /* display: block !important; */
  padding: 5px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#ep_event_booking_ticket .ticket-row-main {
  display: flex;
  justify-content: space-between;
  font-size: 1.1em;
  color: #fff;
}

#ep_event_booking_ticket .ticket-row-seats {
  font-size: 0.9em;
  color: #a0a0b8; /* Muted color */
  padding-top: 5px;
  word-break: break-all;
}
