/**
 * PTST Booking & Enquiry Modal Styles
 * File: hello-theme-child/css/ptst-modal.css
 *
 * All interior styles are scoped under #ptst-modal-overlay to ensure
 * they override Elementor/Hello theme global button and color styles.
 */

/* ============================================================
   OVERLAY — top level, not scoped
   ============================================================ */

.ptst-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.ptst-modal-overlay--open {
    display: flex;
}

/* ============================================================
   ALL INTERIOR STYLES — scoped under #ptst-modal-overlay
   to win specificity over Elementor global styles
   ============================================================ */

#ptst-modal-overlay .ptst-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
    font-size: 14px;
    color: #1a1a1a;
}

/* ── Header ── */

#ptst-modal-overlay .ptst-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8e8e8;
    background: #0C3A6B;
    color: #ffffff;
    flex-shrink: 0;
}

#ptst-modal-overlay .ptst-modal__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
}

#ptst-modal-overlay .ptst-modal__subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

#ptst-modal-overlay .ptst-modal__close {
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 22px !important;
    cursor: pointer;
    padding: 0 0 0 12px !important;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
    box-shadow: none !important;
    outline: none;
}

#ptst-modal-overlay .ptst-modal__close:hover {
    color: #ffffff !important;
    background: none !important;
}

/* ── Steps indicator ── */

#ptst-modal-overlay .ptst-modal__steps {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
    overflow-x: auto;
}

#ptst-modal-overlay .ptst-step-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

#ptst-modal-overlay .ptst-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    background: #ffffff;
    transition: all 0.2s;
}

#ptst-modal-overlay .ptst-step-dot--active {
    border-color: #0C3A6B;
    background: #0C3A6B;
    color: #ffffff;
}

#ptst-modal-overlay .ptst-step-dot--done {
    border-color: #28a745;
    background: #28a745;
    color: #ffffff;
}

#ptst-modal-overlay .ptst-step-label {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}

#ptst-modal-overlay .ptst-step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 4px;
    margin-bottom: 14px;
    min-width: 20px;
}

#ptst-modal-overlay .ptst-step-line--done {
    background: #28a745;
}

/* ── Body ── */

#ptst-modal-overlay .ptst-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    position: relative;
}

/* ── Footer ── */

#ptst-modal-overlay .ptst-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid #e8e8e8;
    background: #f8f9fa;
    flex-shrink: 0;
    gap: 8px;
}

#ptst-modal-overlay .ptst-step-indicator {
    font-size: 12px;
    color: #888;
    flex: 1;
    text-align: center;
}

/* ── Buttons ── */

#ptst-modal-overlay .ptst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    border: none !important;
    transition: background 0.15s, color 0.15s, opacity 0.15s !important;
    line-height: 1 !important;
    white-space: nowrap;
    text-decoration: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

#ptst-modal-overlay .ptst-btn--primary {
    background: #0C3A6B !important;
    color: #ffffff !important;
}

#ptst-modal-overlay .ptst-btn--primary:hover,
#ptst-modal-overlay .ptst-btn--primary:focus {
    background: #0a2f58 !important;
    color: #ffffff !important;
}

#ptst-modal-overlay .ptst-btn--primary:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

#ptst-modal-overlay .ptst-btn--submit {
    background: #B22222 !important;
    color: #ffffff !important;
}

#ptst-modal-overlay .ptst-btn--submit:hover,
#ptst-modal-overlay .ptst-btn--submit:focus {
    background: #8B1A1A !important;
    color: #ffffff !important;
}

#ptst-modal-overlay .ptst-btn--ghost {
    background: transparent !important;
    color: #555555 !important;
    border: 1px solid #d0d0d0 !important;
}

#ptst-modal-overlay .ptst-btn--ghost:hover,
#ptst-modal-overlay .ptst-btn--ghost:focus {
    background: #f0f0f0 !important;
    color: #333333 !important;
    border-color: #b0b0b0 !important;
}

#ptst-modal-overlay .ptst-btn--sm {
    padding: 6px 12px !important;
    font-size: 13px !important;
}

/* ── Course pill ── */

#ptst-modal-overlay .ptst-course-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f4f8;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 20px;
    gap: 12px;
}

#ptst-modal-overlay .ptst-course-pill__name {
    font-weight: 700;
    font-size: 14px;
    color: #0C3A6B;
}

#ptst-modal-overlay .ptst-course-pill__meta {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

#ptst-modal-overlay .ptst-course-change {
    background: transparent !important;
    border: 1px solid #0C3A6B !important;
    color: #0C3A6B !important;
    border-radius: 4px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s !important;
    flex-shrink: 0;
    box-shadow: none !important;
    line-height: 1.4 !important;
}

#ptst-modal-overlay .ptst-course-change:hover,
#ptst-modal-overlay .ptst-course-change:focus {
    background: #0C3A6B !important;
    color: #ffffff !important;
}

/* ── Type cards ── */

#ptst-modal-overlay .ptst-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

#ptst-modal-overlay .ptst-type-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: #ffffff;
}

#ptst-modal-overlay .ptst-type-card:hover {
    border-color: #0C3A6B;
    background: #f0f4f8;
}

#ptst-modal-overlay .ptst-type-card--active {
    border-color: #0C3A6B;
    background: #e8f0f8;
}

#ptst-modal-overlay .ptst-type-card__icon {
    font-size: 24px;
    margin-bottom: 8px;
}

#ptst-modal-overlay .ptst-type-card__label {
    font-weight: 700;
    font-size: 13px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

#ptst-modal-overlay .ptst-type-card__desc {
    font-size: 11px;
    color: #777;
    line-height: 1.4;
}

/* ── Form elements ── */

#ptst-modal-overlay .ptst-form-section {
    margin-bottom: 20px;
}

#ptst-modal-overlay .ptst-form-section__title {
    font-size: 13px;
    font-weight: 700;
    color: #0C3A6B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}

#ptst-modal-overlay .ptst-form-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}

#ptst-modal-overlay .ptst-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

#ptst-modal-overlay .ptst-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

#ptst-modal-overlay .ptst-form-row .ptst-form-group {
    margin-bottom: 0;
}

#ptst-modal-overlay .ptst-label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

#ptst-modal-overlay .ptst-required {
    color: #B22222;
}

#ptst-modal-overlay .ptst-input {
    border: 1px solid #d0d0d0 !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    color: #1a1a1a !important;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
    background: #ffffff !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

#ptst-modal-overlay .ptst-input:focus {
    outline: none !important;
    border-color: #0C3A6B !important;
    box-shadow: 0 0 0 2px rgba(12, 58, 107, 0.1) !important;
}

#ptst-modal-overlay .ptst-textarea {
    resize: vertical;
    min-height: 80px;
}

#ptst-modal-overlay .ptst-help-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

#ptst-modal-overlay .ptst-help-text--muted {
    color: #999;
    font-style: italic;
    margin-top: 16px;
}

/* ── Participants ── */

#ptst-modal-overlay .ptst-seats-badge {
    font-size: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

#ptst-modal-overlay .ptst-participant-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

#ptst-modal-overlay .ptst-participant-row__num {
    font-size: 12px;
    font-weight: 700;
    color: #0C3A6B;
    min-width: 18px;
    padding-top: 9px;
}

#ptst-modal-overlay .ptst-participant-row__fields {
    flex: 1;
}

#ptst-modal-overlay .ptst-participant-row__fields .ptst-form-row {
    margin-bottom: 8px;
}

#ptst-modal-overlay .ptst-participant-row__fields .ptst-form-row:last-child {
    margin-bottom: 0;
}

#ptst-modal-overlay .ptst-participant-remove {
    background: none !important;
    border: none !important;
    color: #999999 !important;
    font-size: 18px !important;
    cursor: pointer;
    padding: 6px !important;
    line-height: 1;
    margin-top: 4px;
    transition: color 0.15s;
    box-shadow: none !important;
}

#ptst-modal-overlay .ptst-participant-remove:hover {
    color: #B22222 !important;
    background: none !important;
}

#ptst-modal-overlay .ptst-participant-remove-placeholder {
    width: 30px;
}

/* ── Accommodation ── */

#ptst-modal-overlay .ptst-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

#ptst-modal-overlay .ptst-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0C3A6B;
}

#ptst-modal-overlay .ptst-accom-card {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
    background: #ffffff;
}

#ptst-modal-overlay .ptst-accom-card:hover {
    border-color: #0C3A6B;
    background: #f0f4f8;
}

#ptst-modal-overlay .ptst-accom-card--selected {
    border-color: #0C3A6B;
    background: #e8f0f8;
}

#ptst-modal-overlay .ptst-accom-card__name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
}

#ptst-modal-overlay .ptst-accom-card__details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

#ptst-modal-overlay .ptst-accom-card__notes {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

/* ── Confirm step ── */

#ptst-modal-overlay .ptst-confirm-section {
    font-size: 14px;
}

#ptst-modal-overlay .ptst-confirm-section__title {
    font-size: 14px;
    font-weight: 700;
    color: #0C3A6B;
    margin-bottom: 14px;
}

#ptst-modal-overlay .ptst-confirm-block {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

#ptst-modal-overlay .ptst-confirm-block__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 8px;
}

#ptst-modal-overlay .ptst-confirm-row {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

#ptst-modal-overlay .ptst-confirm-row:last-child {
    border-bottom: none;
}

#ptst-modal-overlay .ptst-confirm-row__label {
    color: #666;
    flex-shrink: 0;
    width: 110px;
    font-size: 12px;
}

#ptst-modal-overlay .ptst-confirm-row__value {
    color: #1a1a1a;
    font-weight: 500;
    word-break: break-word;
}

#ptst-modal-overlay .ptst-confirm-participant {
    font-size: 13px;
    padding: 3px 0;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

#ptst-modal-overlay .ptst-confirm-participant:last-child {
    border-bottom: none;
}

#ptst-modal-overlay .ptst-confirm-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Success ── */

#ptst-modal-overlay .ptst-success {
    text-align: center;
    padding: 32px 16px;
}

#ptst-modal-overlay .ptst-success__icon {
    width: 56px;
    height: 56px;
    background: #28a745;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

#ptst-modal-overlay .ptst-success__title {
    font-size: 20px;
    font-weight: 700;
    color: #0C3A6B;
    margin-bottom: 10px;
}

#ptst-modal-overlay .ptst-success__message {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

#ptst-modal-overlay .ptst-success__ref {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

#ptst-modal-overlay .ptst-success__email {
    font-size: 13px;
    color: #777;
    margin-bottom: 24px;
}

/* ── Error banner ── */

#ptst-modal-overlay .ptst-error-banner {
    background: #fff3f3;
    border: 1px solid #ffb3b3;
    border-radius: 4px;
    padding: 10px 14px;
    color: #B22222;
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Waitlist notice ── */

#ptst-modal-overlay .ptst-waitlist-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #5d4037;
    margin-bottom: 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    .ptst-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    #ptst-modal-overlay .ptst-modal {
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
        max-width: 100%;
    }

    #ptst-modal-overlay .ptst-form-row {
        grid-template-columns: 1fr;
    }

    #ptst-modal-overlay .ptst-type-grid {
        grid-template-columns: 1fr;
    }

    #ptst-modal-overlay .ptst-modal__header,
    #ptst-modal-overlay .ptst-modal__body,
    #ptst-modal-overlay .ptst-modal__footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    #ptst-modal-overlay .ptst-confirm-row__label {
        width: 90px;
    }
}



/* ── Loading spinner ── */

#ptst-modal-overlay .ptst-modal__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #888;
    font-size: 13px;
    gap: 12px;
}

#ptst-modal-overlay .ptst-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #0C3A6B;
    border-radius: 50%;
    animation: ptst-spin 0.7s linear infinite;
}

@keyframes ptst-spin {
    to { transform: rotate(360deg); }
}