/* assets/css/booking-wizard.css */
/* Styles for booking/create.html */

.cursor-pointer {
    cursor: pointer;
}

/* ── Stepper UI ─────────────────────────────────────────────────────── */
.stepper-nav {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
}

.stepper-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stepper-item::after {
    content: '';
    position: absolute;
    top: 23px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #f4f4f5;
    z-index: -1;
    transition: background-color 0.3s ease;
}

.stepper-item:last-child::after {
    display: none;
}

.stepper-item.completed::after {
    background-color: #18181b;
}

.stepper-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e4e4e7;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.stepper-item.active .stepper-circle {
    background-color: #18181b !important;
    border-color: #18181b !important;
    color: #fff !important;
}

.stepper-item.completed .stepper-circle {
    background-color: #f8f9fa !important;
    border-color: #d4d4d8 !important;
    color: #18181b !important;
}

.stepper-item.pending .stepper-circle {
    background-color: #fff !important;
    border-color: #e4e4e7 !important;
    color: #3f3f46 !important;
    /* Darker color for visibility */
}

.stepper-circle i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stepper-label {
    transition: color 0.3s ease;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.stepper-item.active .stepper-label {
    color: #18181b !important;
    font-weight: bold;
}

.stepper-item.completed .stepper-label,
.stepper-item.pending .stepper-label {
    color: #a1a1aa !important;
    font-weight: normal;
}

/* ── Radio Cards (Step 1) ───────────────────────────────────────────── */
.visitor-type-card {
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px #e4e4e7;
    transition: all 0.2s;
}

.visitor-type-card:hover {
    box-shadow: inset 0 0 0 1px #a1a1aa;
    background: #fafafa;
}

.visitor-type-card.selected {
    border-color: #18181b;
    box-shadow: inset 0 0 0 1px #18181b;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e4e4e7;
    margin: 0 auto;
    position: relative;
    background-color: #fff;
    transition: all 0.2s;
}

.visitor-type-card.selected .custom-radio {
    border-color: #0d6efd;
    background-color: #0d6efd;
}

.visitor-type-card.selected .custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* ── Activity Cards (Step 2) ────────────────────────────────────────── */
.activity-card {
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.activity-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f4f4f5;
}

.activity-body {
    padding: 1.25rem;
}

/* ── Visitor Count Input box (Step 3) ───────────────────────────────── */
.visitor-input-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 0.6rem;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.visitor-input-box span.small {
    line-height: 1.35;
    flex-grow: 1;
    word-break: keep-all;
}

.visitor-input-box input {
    width: 70px;
    text-align: center;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    padding: 0.25rem;
    transition: all 0.2s;
}

.visitor-input-box input:focus {
    outline: none;
    border-color: #adb5bd;
    box-shadow: 0 0 0 0.15rem rgba(173, 181, 189, 0.25);
}

/* Sub-activity checkboxes — black (cross-browser incl. iOS Safari) */
#indoor-subs .form-check-input,
#outdoor-subs .form-check-input {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.3rem !important;
    accent-color: #18181b;
}

#indoor-subs .form-check-input:checked,
#outdoor-subs .form-check-input:checked {
    background-color: #18181b !important;
    border-color: #18181b !important;
}

#indoor-subs .form-check-input:focus,
#outdoor-subs .form-check-input:focus {
    border-color: #18181b !important;
    box-shadow: 0 0 0 0.15rem rgba(24, 24, 27, 0.2) !important;
}

#indoor-subs label,
#outdoor-subs label {
    align-items: flex-start !important;
}

.sub-info-link {
    color: #6b7280;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline dotted;
    white-space: nowrap;
}

.sub-info-link:hover {
    color: #18181b;
}

.total-visitors-box {
    background-color: #e2e2e2;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
}

/* ── Summary (Step 5) ───────────────────────────────────────────────── */
.summary-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
}

.summary-label {
    color: #71717a;
}

.summary-value {
    font-weight: 500;
    color: #18181b;
}

/* ── Form Controls ──────────────────────────────────────────────────── */
.form-control,
.form-select {
    border-color: #d4d4d8;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-label {
    font-size: 0.9rem;
    color: #3f3f46;
}

/* ── Smooth Hide/Show (Stepper steps) ───────────────────────────────── */
.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Custom green submit button ─────────────────────────────────────── */
.btn-success-custom {
    background-color: #0f9d58;
    border-color: #0f9d58;
    color: #fff;
}

.btn-success-custom:hover {
    background-color: #0b8043;
    border-color: #0b8043;
    color: #fff;
}

/* ── LINE Connect Button ────────────────────────────────────────────── */
.btn-line-connect {
    border-color: #06c755 !important;
    color: #06c755 !important;
}

.btn-line-connect:hover {
    background-color: #06c755 !important;
    border-color: #06c755 !important;
    color: #fff !important;
}

/* ── Disabled timeslots ─────────────────────────────────────────────── */
.timeslot-row.disabled-ui {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Choices.js overrides ───────────────────────────────────────────── */
.choices__inner {
    background-color: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    padding: 4px 16px 0px 8px;
    font-size: 0.95rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    color: #18181b !important;
}

.choices__list--single {
    color: #18181b !important;
}

.choices[data-type*=select-one] .choices__inner {
    padding-bottom: 0px;
}

.choices.is-open .choices__inner {
    border-radius: 6px 6px 0 0;
    border-color: #d4d4d8;
}

.choices.is-focused.is-open .choices__inner {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.choices__list--dropdown {
    border: 1px solid #d4d4d8;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    background-color: #fff;
    color: #18181b;
    z-index: 10;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #f8f9fa;
    color: #18181b;
}

.choices__list--dropdown .choices__item--selectable {
    padding-right: 10px;
}

/* ── UI Utilities & Components ────────────────────────────────────────── */
.max-w-650 {
    max-width: 650px;
}

.max-w-900 {
    max-width: 900px;
}

.text-dark-gray {
    color: #1f2937;
}

.text-dark-blue {
    color: #2d3748;
}

.letter-spacing-tight {
    letter-spacing: -0.5px;
}

.text-sm-85 {
    font-size: 0.85rem;
}

.text-sm-75 {
    font-size: 0.75rem;
}

.text-md-95 {
    font-size: 0.95rem;
}

.line-height-16 {
    line-height: 1.6;
}

/* ── Specific Overlays & Backgrounds ────────────────────────────────── */
.bg-slate-50-border {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0 !important;
}

.bg-warning-light {
    background-color: #fffbeb;
}

/* ── Activity Icons (Step 2) ────────────────────────────────────────── */
.icon-box-blue {
    width: 48px;
    height: 48px;
    color: #007bff;
    border: 1px solid #cce3ff;
}

.icon-box-green {
    width: 44px;
    height: 44px;
    background-color: #06c755;
    color: #fff;
}

/* ── Pricing Rules Modal ────────────────────────────────────────────── */
.pricing-modal-dialog {
    width: calc(100% - 2rem);
    max-width: 38rem;
    margin: 1rem auto;
}

.pricing-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 96dvh;
    overflow: hidden;
    background-color: #f4f7fb;
}

.pricing-modal-header--hero {
    position: relative;
    flex-shrink: 0;
    padding: 0;
    border-bottom: none;
    background: #fff;
    overflow: hidden;
}

.pricing-modal-hero {
    position: relative;
    height: 4rem;
    overflow: hidden;
}

.pricing-modal-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.pricing-modal-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.92) 78%,
        #fff 100%
    );
}

.pricing-modal-hero__text {
    position: relative;
    margin-top: -0.875rem;
    padding: 0 1.375rem 0.75rem;
}

.pricing-modal-title {
    font-size: 1.0625rem;
    line-height: 1.35;
    color: #0f172a;
}

.pricing-modal-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pricing-modal-inner {
    padding: 0.875rem 1.25rem 1rem;
}

.pricing-sections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .pricing-sections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-section--wide {
        grid-column: 1 / -1;
    }
}

.pricing-section {
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.pricing-section--deco {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-section__deco {
    flex-shrink: 0;
    width: 3rem;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
}

.pricing-section__body {
    flex: 1;
    min-width: 0;
}

.pricing-section__title {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1d4ed8;
}

.pricing-section__text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
}

.pricing-rate-table {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
}

.pricing-rate-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #475569;
}

.pricing-rate-row strong {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.pricing-rate-row strong::after {
    content: ' บาท';
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
}

.pricing-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 0.5rem;
}

.pricing-activity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.625rem 0.5rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    text-align: center;
}

.pricing-activity-card img {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
}

.pricing-activity-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #475569;
}

.pricing-activity-card__text strong {
    font-size: 0.875rem;
    color: #0f172a;
}

.pricing-notes-compact {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.pricing-note-box {
    padding: 0.75rem 0.875rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.pricing-note-box--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pricing-note-box--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #713f12;
}

.pricing-note-box__lead {
    font-size: 0.8125rem;
    font-weight: 600;
}

.pricing-note-box__list {
    padding-left: 1rem;
    margin: 0;
}

.pricing-note-box__link {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: none;
}

.pricing-modal-footer {
    flex-shrink: 0;
    padding: 0.875rem 1.25rem;
    padding-bottom: max(0.875rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.pricing-modal-ack-btn {
    width: 100%;
    min-height: 44px;
    padding-top: 0.5625rem;
    padding-bottom: 0.5625rem;
    font-size: 0.9375rem;
}

.pricing-modal-scroll-hint {
    display: none !important;
}

.pricing-list-group {
    border-radius: 12px;
    overflow: hidden;
}

.pricing-alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.pricing-alert-note {
    color: #b91c1c;
}

.btn-rounded-8 {
    border-radius: 8px;
}

.confirm-checkbox-box {
    padding: 0.6rem;
    margin-top: 0.15rem;
    cursor: pointer;
}

.confirm-label-box {
    cursor: pointer;
    padding-top: 3px;
}

/* ── Standard Loading Overlay ─────────────────────────────────────────── */
.standard-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.standard-loading-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid #e4e4e7;
    border-top-color: #18181b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.standard-loading-text-container {
    text-align: center;
}

.standard-loading-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #18181b;
    margin-bottom: 0.25rem;
}

.standard-loading-subtitle {
    font-size: 0.85rem;
    color: #71717a;
}

/* ── Loading Overlay Media Queries ────────────────────────────────────── */
@media (max-width: 768px) {
    .booking-wizard-container {
        padding: 1.5rem !important;
        border-radius: 1rem !important;
    }

    .stepper-nav {
        margin-bottom: 1.5rem;
    }

    .stepper-circle {
        width: 38px;
        height: 38px;
    }

    .stepper-circle i {
        font-size: 1rem !important;
    }

    .stepper-label {
        font-size: 0.75rem;
    }

    .activity-header,
    .activity-body {
        padding: 1rem;
    }

    .visitor-input-box {
        padding: 0.5rem 0.75rem;
    }

    .form-control,
    .form-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    h3,
    .fw-bold.display-6 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.25rem !important;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .summary-label {
        font-size: 0.85rem;
        margin-bottom: -0.25rem;
    }
}

/* ===== Pricing modal: คำใบ้เลื่อนลง (ปิดเมื่อพอดีหนึ่งหน้า) ===== */
.pricing-modal-scroll-hint {
    display: none !important;
}

.pricing-modal-scroll-hint__text {
    max-width: 16rem;
}

.pricing-modal-scroll-hint__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    color: #18181b;
}

.pricing-modal-scroll-hint__icon i {
    font-size: 1.25rem;
    animation: pricing-modal-scroll-hint-nudge 1.4s ease-in-out infinite;
}

.pricing-modal-scroll-hint--hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes pricing-modal-scroll-hint-nudge {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}