/**
 * JRNY Trip Booking Popup Styles
 * File: /wp-content/themes/hello-elementor-child/css/jrny-booking.css
 *
 * Design: Luxury travel — deep navy, warm sand accents, elegant serif headings.
 * Fully responsive. Smooth open/close transitions via JS-toggled classes.
 */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --jrny-navy:        #0d2b45;
    --jrny-navy-mid:    #1a4060;
    --jrny-sand:        #c8a96e;
    --jrny-sand-light:  #f5ede0;
    --jrny-white:       #ffffff;
    --jrny-off-white:   #f8f6f2;
    --jrny-text:        #1c2b3a;
    --jrny-text-muted:  #6b7f91;
    --jrny-border:      #dde4ec;
    --jrny-error:       #d0453b;
    --jrny-error-bg:    #fff2f1;
    --jrny-success:     #1e7e5c;
    --jrny-radius:      14px;
    --jrny-radius-sm:   8px;
    --jrny-shadow:      0 24px 64px rgba(13, 43, 69, 0.28), 0 4px 16px rgba(13, 43, 69, 0.14);
    --jrny-transition:  220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   OVERLAY / BACKDROP
   ============================================================ */
.jrny-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 22, 35, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    /* display:none toggled by jQuery – no CSS override needed */
}

/* ============================================================
   MODAL CARD
   ============================================================ */
.jrny-modal {
    position: relative;
    background: var(--jrny-white);
    border-radius: var(--jrny-radius);
    box-shadow: var(--jrny-shadow);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 40px 36px;
    box-sizing: border-box;
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: transform var(--jrny-transition), opacity var(--jrny-transition);

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--jrny-border) transparent;
}

.jrny-modal::-webkit-scrollbar        { width: 5px; }
.jrny-modal::-webkit-scrollbar-track  { background: transparent; }
.jrny-modal::-webkit-scrollbar-thumb  { background: var(--jrny-border); border-radius: 4px; }

/* Animate in when JS adds this class */
.jrny-modal--visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ============================================================
   CLOSE BUTTON
   ============================================================ */
.jrny-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--jrny-off-white);
    border-radius: 50%;
    cursor: pointer;
    color: var(--jrny-text-muted);
    transition: background var(--jrny-transition), color var(--jrny-transition), transform var(--jrny-transition);
    padding: 0;
    line-height: 1;
}

.jrny-modal__close:hover,
.jrny-modal__close:focus-visible {
    background: var(--jrny-navy);
    color: var(--jrny-white);
    transform: rotate(90deg);
    outline: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.jrny-modal__header {
    margin-bottom: 28px;
    padding-right: 28px; /* avoid close button overlap */
}

.jrny-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--jrny-sand);
}

.jrny-modal__title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--jrny-navy);
    letter-spacing: -0.02em;
}

.jrny-modal__trip-name {
    margin: 0;
    font-size: 14px;
    color: var(--jrny-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.jrny-modal__trip-name::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 2px;
    background: var(--jrny-sand);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ============================================================
   GLOBAL FORM ERROR BANNER
   ============================================================ */
.jrny-form-errors {
    background: var(--jrny-error-bg);
    border: 1px solid var(--jrny-error);
    border-radius: var(--jrny-radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--jrny-error);
    font-size: 14px;
}

.jrny-form-errors p {
    margin: 0;
}

/* ============================================================
   FORM LAYOUT
   ============================================================ */
#jrny-booking-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jrny-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media ( max-width: 480px ) {
    .jrny-field-group {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   FORM FIELDS
   ============================================================ */
.jrny-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jrny-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--jrny-text);
    letter-spacing: 0.01em;
}

.jrny-required {
    color: var(--jrny-sand);
    margin-left: 2px;
}

.jrny-field input,
.jrny-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--jrny-text);
    background: var(--jrny-off-white);
    border: 1.5px solid var(--jrny-border);
    border-radius: var(--jrny-radius-sm);
    transition: border-color var(--jrny-transition), box-shadow var(--jrny-transition), background var(--jrny-transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.jrny-field input::placeholder,
.jrny-field textarea::placeholder {
    color: #b0bec5;
}

.jrny-field input:hover,
.jrny-field textarea:hover {
    border-color: #b0c4d8;
    background: var(--jrny-white);
}

.jrny-field input:focus,
.jrny-field textarea:focus {
    border-color: var(--jrny-navy-mid);
    background: var(--jrny-white);
    box-shadow: 0 0 0 3px rgba(26, 64, 96, 0.12);
}

.jrny-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.55;
}

/* Error state */
.jrny-field input.jrny-input--error,
.jrny-field textarea.jrny-input--error {
    border-color: var(--jrny-error);
    background: var(--jrny-error-bg);
}

.jrny-field input.jrny-input--error:focus,
.jrny-field textarea.jrny-input--error:focus {
    box-shadow: 0 0 0 3px rgba(208, 69, 59, 0.14);
}

/* Inline field error */
.jrny-field-error {
    font-size: 12px;
    color: var(--jrny-error);
    min-height: 16px;
    display: none;
    align-items: center;
    gap: 4px;
}

.jrny-field-error--visible {
    display: flex;
}

.jrny-field-error::before {
    content: '⚠';
    font-size: 11px;
    flex-shrink: 0;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.jrny-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--jrny-white);
    background: var(--jrny-navy);
    border: none;
    border-radius: var(--jrny-radius-sm);
    cursor: pointer;
    transition: background var(--jrny-transition), transform var(--jrny-transition), box-shadow var(--jrny-transition);
    position: relative;
    overflow: hidden;
}

.jrny-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 169, 110, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.jrny-submit-btn:hover:not(:disabled) {
    background: var(--jrny-navy-mid);
    box-shadow: 0 6px 20px rgba(13, 43, 69, 0.3);
    transform: translateY(-1px);
}

.jrny-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.jrny-submit-btn:disabled,
.jrny-submit-btn--loading {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Spinner animation */
.jrny-btn-spinner svg {
    animation: jrny-spin 0.8s linear infinite;
    display: block;
}

@keyframes jrny-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.jrny-success {
    text-align: center;
    padding: 24px 16px 8px;
}

.jrny-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e8f5ef 0%, #d0eddf 100%);
    border-radius: 50%;
    color: var(--jrny-success);
}

.jrny-success h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--jrny-navy);
}

.jrny-success p {
    margin: 0 0 28px;
    font-size: 15px;
    color: var(--jrny-text-muted);
    line-height: 1.6;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.jrny-close-success {
    display: inline-flex;
    align-items: center;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--jrny-navy);
    background: transparent;
    border: 1.5px solid var(--jrny-navy);
    border-radius: var(--jrny-radius-sm);
    cursor: pointer;
    transition: background var(--jrny-transition), color var(--jrny-transition);
}

.jrny-close-success:hover {
    background: var(--jrny-navy);
    color: var(--jrny-white);
}

/* ============================================================
   BODY LOCK (prevent background scroll when modal is open)
   ============================================================ */
body.jrny-modal-open {
    overflow: hidden;
}
button#jrny-modal-close {
    background: transparent;
    padding: 0;
}
 
button#jrny-modal-close svg path {
    stroke: #bc9357;
}
 
button#jrny-modal-close svg {
    width: 14px;
    height: auto;
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media ( max-width: 600px ) {
    .jrny-modal {
        padding: 28px 22px 26px;
        border-radius: 12px 12px 0 0;
        max-height: 92vh;
    }

    .jrny-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .jrny-modal--visible {
        transform: translateY(0);
    }

    /* Slide up from bottom on mobile */
    .jrny-modal {
        transform: translateY(30px);
        border-radius: 18px 18px 0 0;
    }

    .jrny-modal__title {
        font-size: 22px;
    }
}