/* Quick Inquiry drawer, Schedule Selection drawer, and the per-course
   "select date" modal — shared by courses.blade.php and course-detail.blade.php.
   Paired with public/js/quick-inquiry.js. */

.date-item {
  cursor: pointer;
  background: #fff;
  /* border: 1.5px solid #000000 !important; */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-item .form-check-input:checked+.form-check-label .fw-bold {
  color: #3d5ee1;
}

.date-item .form-check-input {
  width: 20px !important;
  height: 20px !important;
  border-color: #cbd5e1 !important;
  border-radius: 50% !important;
}

.date-item .form-check-input:checked {
  background-color: #3d5ee1 !important;
  border-color: #3d5ee1 !important;
}

.time-card {
  border-radius: 5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.time-card:hover {
  background-color: #eef2ff;
  border-color: #3d5ee1 !important;
}

.time-card input[type="radio"] {
  cursor: pointer;
}

.select-date-btn {
  box-shadow: 0 4px 15px rgba(61, 94, 225, 0.3);
  transition: all 0.3s ease;
}

.select-date-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 94, 225, 0.4);
  background-color: #2e4bc4 !important;
}

.modal.fade .modal-dialog {
  transition: translate 0.2s linear;
}

.modal.show .modal-dialog {
  translate: 0 0 !important;
}

.modal.show {
  display: flex !important;
}

.modal-header_flex-row {
  flex-direction: column;
}

@media (max-width: 576px) {
  .modal-header div {
    gap: 20px;
  }

  .modal-header div:nth-child(1) h5 {
    margin-bottom: 5px !important;
  }

  .date-item_time {
    grid-template-columns: 1fr !important;
  }
}

/* ======= Quick Inquiry Drawer Styles ======= */
.quick-inquiry-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quick-inquiry-drawer.active {
  transform: translateX(0);
}

.quick-inquiry-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.quick-inquiry-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}

.close-inquiry-btn {
  background: #f8f9fa;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #666;
}

.inquiry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

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

/* Country Code Dropdown */
.country-code-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #eee;
  border-radius: 8px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  /* needed for dropdown width reference */
}

.country-code-group .dropdown {
  position: static !important;
}

.country-code-group.focused {
  border-color: #3d5ee1;
  box-shadow: 0 0 0 4px rgba(61, 94, 225, 0.1);
}

.country-code-group .dropdown-menu {
  position: absolute !important;
  width: 100% !important;
  left: 0 !important;
  transform: none !important;
  top: 100% !important;
}

.country-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 8px 0 0 8px;
  border-right: 0;
  font-size: 14px;
  padding: 0 12px;
  border: none;
  background: #e9ecef;
}

.country-dropdown-btn:focus,
.country-dropdown-btn:active {
  outline: none;
  box-shadow: none;
  border: none;
}

.country-list-menu {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  max-height: 220px;
  overflow-y: auto;
  font-size: 14px;
  /* w-100 class handles full width via Bootstrap */
}

.country-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

#selectedFlag {
  font-size: 18px;
}

.country-item:hover {
  background: var(--color-main-50, #f0f4ff);
}

.no-border_form {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
}

.no-border_form:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Form Controls Polish */
.quick-inquiry-body .form-control {
  border: 1.5px solid #eee;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.quick-inquiry-body .form-control:focus {
  border-color: #3d5ee1;
  box-shadow: 0 0 0 4px rgba(61, 94, 225, 0.1);
}

.quick-inquiry-body .br-8 {
  border-radius: 8px;
}

#submitInquiry:hover {
  background-color: #2e4bc4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 94, 225, 0.3);
}

#submitInquiry:active {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .quick-inquiry-drawer {
    width: 100%;
  }
}

/* ========== Schedule Selection Drawer Styles ========== */
.schedule-selection-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  width: 100%;
  max-width: 30%;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.schedule-selection-drawer.active {
  right: 0;
}

.schedule-selection-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}

.go-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.go-back-btn i {
  font-size: 20px;
  transform: scaleX(-1);
}

.schedule-selection-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-selection-body h4 {
  margin: 0;
  color: #1f2937;
  font-weight: 700;
  text-align: center;
  font-size: 20px;
}

.schedule-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-item-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #1f2937;
  font-weight: 600;
}

.schedule-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.schedule-time-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #f8f9fa;
  border: 1.5px solid #e5e7eb;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-time-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3d5ee1;
}

.schedule-time-card input[type="checkbox"]:checked {
  accent-color: #3d5ee1;
}

.schedule-time-label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  margin-left: 4px;
}

.schedule-selection-footer {
  border-top: 1px solid #e5e7eb;
  padding: 20px 24px;
  background: #f8f9fa;
  flex-shrink: 0;
}

#continueScheduleBtn {
  background-color: #3d5ee1;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

#continueScheduleBtn:hover {
  background-color: #2e4bc4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 94, 225, 0.3);
}

#continueScheduleBtn:active {
  transform: translateY(0);
}

#continueScheduleBtn:disabled {
  background-color: #d0d5dd;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .schedule-selection-drawer {
    max-width: 40%;
  }
}

@media (max-width: 768px) {
  .schedule-selection-drawer {
    max-width: 50%;
  }

  .schedule-time-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .schedule-selection-drawer {
    max-width: 100%;
  }

  .schedule-selection-header {
    padding: 16px 20px;
  }

  .schedule-selection-body {
    padding: 20px;
  }

  .schedule-selection-footer {
    padding: 16px 20px;
  }
}
