/* ==========================================================================
   MTraining - New Booking Page Stylesheet (v2)
   Matches Modern Booking Form Mockup
   ========================================================================== */

:root {
  --bkg-color: #f1f3f6;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --input-bg: #ffffff;
  --card-radius: 12px;
  --input-radius: 6px;
  --primary-pink: #d81b60;
  --primary-pink-hover: #c2185b;
  --sidebar-box-bg: #f8fafc;
  --sidebar-box-border: #e2e8f0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base Wrapper */
.booking-v2-wrapper {
  background-color: var(--bkg-color);
  font-family: var(--font-family);
  color: var(--text-main);
  padding: 40px 0 60px 0;
  min-height: 80vh;
}

.booking-v2-wrapper * {
  box-sizing: border-box;
}

.booking-v2-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Section */
.booking-v2-header {
  margin-bottom: 28px;
}

.booking-v2-title {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.booking-v2-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Two Column Layout */
.booking-v2-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.booking-v2-main {
  flex: 1 1 65%;
  min-width: 0;
}

.booking-v2-sidebar {
  flex: 0 0 35%;
  max-width: 360px;
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
}

/* Cards */
.booking-v2-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.booking-v2-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

/* Form Groups & Grid */
.booking-v2-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.booking-v2-row:last-child {
  margin-bottom: 0;
}

.booking-v2-col {
  flex: 1;
  min-width: 0;
}

.booking-v2-col-3 {
  flex: 1;
  min-width: 0;
}

.booking-v2-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.booking-v2-field:last-child {
  margin-bottom: 0;
}

.booking-v2-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.booking-v2-req {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.booking-v2-label-optional {
  color: var(--text-light);
  font-weight: 400;
  font-size: 12px;
}

.booking-v2-input,
.booking-v2-select,
.booking-v2-textarea {
  width: 100%;
  height: 42px;
  padding: 8px 14px;
  background-color: var(--input-bg);
  border: 1px solid #d1d5db;
  border-radius: var(--input-radius);
  font-size: 14px;
  color: var(--text-main);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
}

.booking-v2-textarea {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

.booking-v2-input:focus,
.booking-v2-select:focus,
.booking-v2-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.booking-v2-input::placeholder,
.booking-v2-textarea::placeholder {
  color: #9ca3af;
  font-size: 13.5px;
}

/* Custom Checkbox */
.booking-v2-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 0;
  user-select: none;
  font-size: 13.5px;
  color: #374151;
  font-weight: 500;
}

.booking-v2-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

/* Delegate Details Sections */
/* Delegate Items & Collapsible structure */
.booking-v2-delegate-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-v2-delegate-item:last-child {
  margin-bottom: 0;
}

.booking-v2-delegate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.booking-v2-delegate-header:hover {
  background-color: #f1f5f9;
}

.booking-v2-delegate-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-v2-delegate-subtitle .badge {
  font-size: 11px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 12px;
}

.booking-v2-delegate-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-v2-delegate-preview {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-v2-delegate-toggle-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.booking-v2-delegate-item.is-open .booking-v2-delegate-toggle-icon {
  transform: rotate(180deg);
}

.booking-v2-delegate-body {
  padding: 16px 16px 4px 16px;
  background-color: #ffffff;
}

/* Desktop layout: delegates have no card borders, blend seamlessly with card */
@media (min-width: 768px) {
  .booking-v2-delegate-item {
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 0 18px 0;
    margin-bottom: 18px;
    border-bottom: 1px dashed #e2e8f0 !important;
  }
  .booking-v2-delegate-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .booking-v2-delegate-header {
    background: transparent !important;
    border: none !important;
    padding: 0 0 12px 0 !important;
    cursor: default;
  }
  .booking-v2-delegate-header:hover {
    background: transparent !important;
  }
  .booking-v2-delegate-header-right {
    display: none !important;
  }
  .booking-v2-delegate-body {
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
  }
}

/* Mobile layout: delegates are closed by default and collapsible as bordered items */
@media (max-width: 767px) {
  .booking-v2-delegate-item:not(.is-open) .booking-v2-delegate-header {
    border-bottom: 1px solid transparent;
  }
  .booking-v2-delegate-item:not(.is-open) .booking-v2-delegate-body {
    display: none;
  }
}

/* Billing Notice & Radio Groups */
.booking-v2-notice {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
  background-color: #f8fafc;
  border-left: 3px solid #60a5fa;
  padding: 12px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.booking-v2-section-prompt {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 16px 0 10px 0;
}

.booking-v2-radio-group {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
}

.booking-v2-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: #374151;
  margin-bottom: 0;
}

.booking-v2-radio-label input[type="radio"] {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

.booking-v2-helper-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Sidebar Styling */
.booking-v2-sidebar-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.booking-v2-event-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.35;
}

.booking-v2-event-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.booking-v2-event-meta .bullet {
  color: var(--text-light);
  font-size: 10px;
}

/* Pricing Breakdown */
.booking-v2-price-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.booking-v2-price-per-delegate {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.booking-v2-price-per-delegate span {
  font-weight: 600;
  color: #1e293b;
}

.booking-v2-edit-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.booking-v2-edit-btn:hover {
  color: #1d4ed8;
}

.booking-v2-delegate-select-wrap {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.booking-v2-price-breakdown {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.booking-v2-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: #4b5563;
  margin-bottom: 8px;
}

.booking-v2-price-row.total-row {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0;
}

/* Submit Button & Card */
.booking-v2-submit-card {
  margin-top: 0;
}

/* Submit Button */
.booking-v2-submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #e61e68 0%, #d81b60 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(216, 27, 96, 0.25);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}

.booking-v2-submit-btn:hover {
  background: linear-gradient(135deg, #d81b60 0%, #c2185b 100%);
  box-shadow: 0 6px 16px rgba(216, 27, 96, 0.35);
  transform: translateY(-1px);
}

.booking-v2-submit-btn:active {
  transform: translateY(0);
}

.booking-v2-submit-btn:disabled {
  background: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Response / Message Alerts */
.booking-v2-msg {
  margin-top: 14px;
}

.booking-v2-msg .alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 0;
}

/* Validation Error Styling */
.booking-v2-input.error,
.booking-v2-select.error,
.booking-v2-textarea.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.booking-v2-input.error:focus,
.booking-v2-select.error:focus,
.booking-v2-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

label.error {
  color: #dc2626 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  display: block !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  /* 3. Hide focus-item on mobile/tablet view */
  .focus-item,
  section.focus-item {
    display: none !important;
  }

  /* 1. Move Event & Location and Pricing summary to top */
  .booking-v2-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .booking-v2-sidebar {
    display: contents;
    width: 100%;
    max-width: 100%;
    position: static;
  }

  .booking-v2-card-event {
    order: 1;
    width: 100%;
    margin-bottom: 0;
  }

  .booking-v2-card-pricing {
    order: 2;
    width: 100%;
    margin-bottom: 0;
  }

  .booking-v2-main {
    order: 3;
    width: 100%;
  }

  .booking-v2-submit-card {
    order: 4;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 24px;
  }
}

@media (max-width: 640px) {
  .booking-v2-wrapper {
    padding: 24px 0 40px 0;
  }
  .booking-v2-header {
    margin-bottom: 20px;
  }
  .booking-v2-title {
    font-size: 22px;
  }
  .booking-v2-row {
    flex-direction: column;
    gap: 12px;
  }
  .booking-v2-card {
    padding: 18px 16px;
    margin-bottom: 16px;
  }
  .booking-v2-radio-group {
    flex-direction: column;
    gap: 10px;
  }
}

/* ==========================================================================
   TabCourseDetails Popup Booking / Enquiry Form V2 Styles
   ========================================================================== */

#enquireCourseModal .modal-dialog {
  max-width: 720px;
  margin: 30px auto;
}

#enquireCourseModal .modal-content {
  background: #ffffff;
  border-radius: 8px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 28px 32px;
  position: relative;
}

#enquireCourseModal .modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

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

#enquireCourseModal .modal-close img {
  width: 14px;
  height: 14px;
}

#enquireCourseModal .modal-body {
  padding: 0;
}

.modal-booking-v2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin-top: 10px;
}

.modal-v2-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

.modal-v2-col {
  flex: 1;
  min-width: 0;
  position: relative;
}

.modal-v2-col-full {
  width: 100%;
  position: relative;
}

.modal-v2-input,
.modal-v2-select,
.modal-v2-textarea {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  color: #374151;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
}

.modal-v2-select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

.modal-v2-textarea {
  height: auto;
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.modal-v2-input:focus,
.modal-v2-select:focus,
.modal-v2-textarea:focus,
.modal-v2-dropdown-trigger:focus,
.modal-v2-dropdown-trigger.active {
  border-color: #ec268f;
  box-shadow: 0 0 0 3px rgba(236, 38, 143, 0.15);
}

.modal-v2-input::placeholder,
.modal-v2-textarea::placeholder {
  color: #9ca3af;
  font-size: 14px;
}

/* Multi-select Dropdown */
.modal-v2-dropdown-wrap {
  position: relative;
  width: 100%;
}

.modal-v2-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.modal-v2-dropdown-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #374151;
  padding-right: 8px;
}

.modal-v2-dropdown-text.placeholder-text {
  color: #9ca3af;
}

.modal-v2-dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #6b7280;
  margin-left: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.modal-v2-dropdown-trigger.active .modal-v2-dropdown-arrow {
  transform: rotate(180deg);
}

.modal-v2-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #ec268f;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1050;
  padding: 6px 0;
}

.modal-v2-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  margin: 0;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  color: #374151;
  transition: background-color 0.15s ease;
  user-select: none;
}

.modal-v2-dropdown-item:hover {
  background-color: #f8fafc;
}

.modal-v2-opt-text {
  flex: 1;
  padding-right: 12px;
}

/* Custom Pink Checkbox */
.modal-v2-chk-custom-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.modal-v2-chk {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
  z-index: 2;
}

.modal-v2-chk-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #ec268f;
  border-radius: 3px;
  background: #ffffff;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.modal-v2-chk:checked + .modal-v2-chk-box {
  background: #ec268f;
}

.modal-v2-chk:checked + .modal-v2-chk-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Conditional Venue Address dropdown */
.modal-v2-venue-address-wrap {
  margin-top: 10px;
  width: 100%;
}

/* Footer & Submit Button */
.modal-v2-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  gap: 16px;
}

.modal-v2-submit-btn {
  background: #ec268f;
  background: linear-gradient(135deg, #f03389 0%, #ec268f 100%);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  padding: 12px 36px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(236, 38, 143, 0.25);
  transition: all 0.2s ease;
}

.modal-v2-submit-btn:hover {
  background: #d81b60;
  box-shadow: 0 4px 12px rgba(236, 38, 143, 0.4);
  transform: translateY(-1px);
}

.modal-v2-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.modal-v2-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.modal-v2-logos img {
  height: 60px;
  max-width: 120px;
  object-fit: contain;
}

@media (max-width: 640px) {
  #enquireCourseModal .modal-dialog {
    margin: 15px;
  }
  #enquireCourseModal .modal-content {
    padding: 22px 18px;
  }
  .modal-v2-row {
    flex-direction: column;
    gap: 12px;
  }
  .modal-v2-footer {
    justify-content: stretch;
  }
  .modal-v2-submit-btn {
    width: 100%;
    text-align: center;
  }
}

#DatesBooking .modal-booking-v2 {
  max-width: 720px;
  margin-top: 20px;
}

#DatesBooking .modal-v2-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
}

