/**
 * WPX Booking Inquiry — Frontend Styles
 * Matches the ElisiumScape Figma design:
 * dark header, light body, gold (#C9A84C) accents
 */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --wpx-gold:       #C9A84C;
    --wpx-gold-dark:  #A8883A;
    --wpx-black:      #111111;
    --wpx-dark:       #1A1A1A;
    --wpx-gray-900:   #374151;
    --wpx-gray-600:   #6B7280;
    --wpx-gray-300:   #D1D5DB;
    --wpx-gray-100:   #F3F4F6;
    --wpx-white:      #FFFFFF;
    --wpx-bg:         #F9F9F7;
    --wpx-radius:     6px;
    --wpx-shadow:     0 2px 16px rgba(0,0,0,.08);
    --wpx-font:       Georgia, 'Times New Roman', serif;
    --wpx-font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Account wrap layout ────────────────────────────────────────────────────── */
.wpx-bi-account-wrap {
    display: flex;
    gap: 0;
    min-height: 500px;
    font-family: var(--wpx-font-sans);
    background: var(--wpx-bg);
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.wpx-bi-sidebar {
    width: 200px;
    flex-shrink: 0;
    padding: 32px 0;
    border-right: 1px solid var(--wpx-gray-300);
}

.wpx-bi-sidebar-link {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 400;
    color: var(--wpx-gray-900);
    text-decoration: none;
    transition: color .15s;
}

.wpx-bi-sidebar-link:hover,
.wpx-bi-sidebar-link.active {
    color: var(--wpx-gold);
    text-decoration: none;
}

/* ── Panel ──────────────────────────────────────────────────────────────────── */
.wpx-bi-panel {
    flex: 1;
    padding: 40px 48px;
}

.wpx-bi-panel-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px;
    font-family: var(--wpx-font-sans);
}

.wpx-bi-subtitle {
    color: var(--wpx-gray-600);
    margin: 0 0 24px;
    font-size: 14px;
}

/* ── Avatar ─────────────────────────────────────────────────────────────────── */
.wpx-bi-avatar-wrap {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.wpx-bi-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--wpx-gold);
    display: block;
    margin: 0 auto 4px;
}

.wpx-bi-avatar-btn {
    position: absolute;
    bottom: 24px;
    right: -6px;
    width: 32px;
    height: 32px;
    background: var(--wpx-black);
    color: var(--wpx-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wpx-bi-avatar-label {
    font-size: 12px;
    color: var(--wpx-gray-600);
    margin: 4px 0 0;
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.wpx-bi-form {
    max-width: 760px;
}

.wpx-bi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wpx-bi-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpx-bi-form-group.wpx-bi-full {
    grid-column: 1 / -1;
}

.wpx-bi-form-group label {
    font-size: 13px;
    color: var(--wpx-gray-600);
    font-weight: 500;
}

.wpx-bi-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wpx-bi-input-icon {
    position: absolute;
    left: 12px;
    color: var(--wpx-gray-600);
    font-size: 14px;
    pointer-events: none;
}

.wpx-bi-form input[type="text"],
.wpx-bi-form input[type="email"],
.wpx-bi-form input[type="tel"],
.wpx-bi-form input[type="number"],
.wpx-bi-form input[type="date"],
.wpx-bi-form input[type="password"],
.wpx-bi-form textarea,
.wpx-bi-form select {
    width: 100%;
    padding: 11px 14px 11px 36px;
    border: 1px solid var(--wpx-gray-300);
    border-radius: var(--wpx-radius);
    font-size: 14px;
    font-family: var(--wpx-font-sans);
    background: var(--wpx-white);
    color: var(--wpx-gray-900);
    box-sizing: border-box;
    transition: border-color .15s;
}

.wpx-bi-form textarea,
.wpx-bi-form select {
    padding-left: 14px;
}

.wpx-bi-form input:focus,
.wpx-bi-form textarea:focus,
.wpx-bi-form select:focus {
    outline: none;
    border-color: var(--wpx-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.wpx-bi-form input:disabled {
    background: var(--wpx-gray-100);
    cursor: not-allowed;
}

.wpx-bi-form-actions {
    margin-top: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.wpx-bi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 28px;
    border-radius: var(--wpx-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
    text-decoration: none;
}

.wpx-bi-btn-gold {
    background: var(--wpx-gold);
    color: var(--wpx-white);
    border-color: var(--wpx-gold);
}
.wpx-bi-btn-gold:hover {
    background: var(--wpx-gold-dark);
    border-color: var(--wpx-gold-dark);
    color: var(--wpx-white);
    text-decoration: none;
}

.wpx-bi-btn-outline {
    background: transparent;
    color: var(--wpx-gray-900);
    border-color: var(--wpx-gray-300);
}
.wpx-bi-btn-outline:hover {
    border-color: var(--wpx-gray-900);
    text-decoration: none;
}

.wpx-bi-btn-danger-outline {
    background: transparent;
    color: #B91C1C;
    border-color: #B91C1C;
}
.wpx-bi-btn-danger-outline:hover {
    background: #FEE2E2;
}

.wpx-bi-btn-ghost {
    background: transparent;
    color: var(--wpx-gray-600);
    border-color: transparent;
}

.wpx-bi-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.wpx-bi-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--wpx-gold);
    text-decoration: none;
}
.wpx-bi-link:hover { text-decoration: underline; }

.wpx-bi-link.wpx-bi-gold { color: var(--wpx-gold); }

/* ── Status badges ───────────────────────────────────────────────────────────── */
.wpx-bi-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-submitted   { background: #EDE9FE; color: #7C3AED; }
.badge-review      { background: #FEF3C7; color: #D97706; }
.badge-price       { background: #FEF9C3; color: #B45309; }
.badge-accepted    { background: #D1FAE5; color: #065F46; }
.badge-confirmed   { background: #A7F3D0; color: #064E3B; }
.badge-rejected    { background: #FEE2E2; color: #B91C1C; }
.badge-revision    { background: #EDE9FE; color: #6D28D9; }
.badge-expired     { background: #E5E7EB; color: #4B5563; }

/* ── Inquiries table ─────────────────────────────────────────────────────────── */
.wpx-bi-inquiries-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.wpx-bi-logged-as {
    font-size: 13px;
    color: var(--wpx-gray-600);
}
.wpx-bi-logged-as strong { color: var(--wpx-gray-900); }

.wpx-bi-table-wrap {
    overflow-x: auto;
}

.wpx-bi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wpx-bi-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--wpx-gray-100);
    font-size: 12px;
    color: var(--wpx-gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wpx-bi-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wpx-gray-100);
    vertical-align: middle;
}

.wpx-bi-prop {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpx-bi-prop-img {
    width: 44px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wpx-bi-action-pending   { font-size: 13px; color: var(--wpx-gray-600); }
.wpx-bi-action-confirmed { font-size: 13px; font-weight: 600; color: #065F46; }

/* ── Mobile cards (hidden on desktop) ─────────────────────────────────────── */
.wpx-bi-cards { display: none; }

.wpx-bi-card {
    background: var(--wpx-white);
    border-radius: var(--wpx-radius);
    box-shadow: var(--wpx-shadow);
    padding: 16px;
    margin-bottom: 12px;
}

.wpx-bi-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.wpx-bi-card-top .wpx-bi-prop { flex: 1; gap: 12px; }
.wpx-bi-card-top .wpx-bi-prop-img { width: 52px; height: 42px; }
.wpx-bi-card-top .wpx-bi-prop div { display: flex; flex-direction: column; }
.wpx-bi-card-top .wpx-bi-prop small { font-size: 12px; color: var(--wpx-gray-600); }

.wpx-bi-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--wpx-gray-600);
    margin-bottom: 12px;
}

.wpx-bi-card-action .wpx-bi-btn {
    width: 100%;
}

/* ── Modals ──────────────────────────────────────────────────────────────────── */
.wpx-bi-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpx-bi-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    cursor: pointer;
}

.wpx-bi-modal-inner {
    position: relative;
    background: var(--wpx-white);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

/* Quote modal — split layout */
.wpx-bi-quote-inner {
    display: flex;
    width: 860px;
    max-width: 95vw;
}

.wpx-bi-quote-left {
    width: 310px;
    flex-shrink: 0;
    position: relative;
    background: var(--wpx-black);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    color: var(--wpx-white);
}

.wpx-bi-quote-img-wrap { position: relative; }
.wpx-bi-quote-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wpx-bi-quote-ready-badge {
    position: absolute;
    bottom: 8px;
    left: 12px;
    background: rgba(201,168,76,.9);
    color: var(--wpx-white);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wpx-bi-quote-left h3 {
    padding: 16px 16px 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--wpx-white);
    margin: 0;
}

.wpx-bi-quote-left p {
    padding: 0 16px 16px;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin: 0;
}

.wpx-bi-quote-right {
    flex: 1;
    padding: 28px;
}

/* Revision modal */
.wpx-bi-revision-inner {
    width: 540px;
    max-width: 95vw;
    padding: 28px;
}

.wpx-bi-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.wpx-bi-modal-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px;
}

.wpx-bi-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--wpx-gray-600);
    padding: 0;
    line-height: 1;
}

.wpx-bi-ref {
    font-size: 12px;
    color: var(--wpx-gray-600);
    display: block;
}

.wpx-bi-info-box {
    background: #EFF6FF;
    border-radius: var(--wpx-radius);
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1D4ED8;
}

.wpx-bi-info-box strong { display: block; margin-bottom: 4px; }

/* Quote items in modal */
#wpx-bi-quote-items table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#wpx-bi-quote-items tr td:first-child { color: var(--wpx-gray-600); }
#wpx-bi-quote-items tr td:last-child  { text-align: right; font-weight: 600; }
#wpx-bi-quote-items tr td { padding: 8px 0; border-bottom: 1px solid var(--wpx-gray-100); }

.wpx-bi-quote-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0;
}

.wpx-bi-quote-total span {
    color: var(--wpx-gold);
    font-size: 22px;
}

/* What's included */
.wpx-bi-whats-included {
    background: var(--wpx-gray-100);
    border-radius: var(--wpx-radius);
    padding: 14px 16px;
    margin: 16px 0;
}

.wpx-bi-whats-included ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.wpx-bi-whats-included li {
    font-size: 13px;
    padding: 3px 0;
    color: var(--wpx-gray-900);
}

.wpx-bi-whats-included li::before {
    content: '✓ ';
    color: var(--wpx-gold);
    font-weight: 700;
}

/* Quote action buttons */
.wpx-bi-quote-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.wpx-bi-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* Quote summary box in revision modal */
.wpx-bi-quote-summary-box {
    background: var(--wpx-gray-100);
    border-radius: var(--wpx-radius);
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 13px;
}

.wpx-bi-quote-summary-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.wpx-bi-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--wpx-gray-600);
}

.wpx-bi-summary-row span:last-child {
    color: var(--wpx-gray-900);
    font-weight: 600;
}

/* Fine print */
.wpx-bi-fine-print {
    font-size: 11px;
    color: var(--wpx-gray-600);
    text-align: center;
    margin-top: 8px;
}

/* ── Messaging in modal ──────────────────────────────────────────────────────── */
.wpx-bi-message-section {
    margin-top: 20px;
    border-top: 1px solid var(--wpx-gray-100);
    padding-top: 16px;
}

.wpx-bi-message-section strong { display: block; margin-bottom: 10px; font-size: 14px; }

.wpx-bi-message-thread {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    margin-bottom: 12px;
}

.wpx-bi-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.msg-customer {
    background: var(--wpx-gray-100);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

.msg-admin {
    background: var(--wpx-gold);
    color: var(--wpx-white);
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.wpx-bi-msg-meta {
    font-size: 11px;
    color: var(--wpx-gray-600);
    margin-bottom: 4px;
}

.msg-admin .wpx-bi-msg-meta { color: rgba(255,255,255,.75); }

.wpx-bi-message-composer {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.wpx-bi-message-composer textarea {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--wpx-gray-300);
    border-radius: var(--wpx-radius);
    font-size: 13px;
    font-family: var(--wpx-font-sans);
    resize: none;
}

/* ── Feedback messages ──────────────────────────────────────────────────────── */
.wpx-bi-msg {
    margin-top: 12px;
    font-size: 13px;
    padding: 0;
}

.wpx-bi-msg.success { color: #065F46; }
.wpx-bi-msg.error   { color: #B91C1C; }

/* ── Logged-out prompt ──────────────────────────────────────────────────────── */
.wpx-bi-logged-out {
    padding: 40px 20px;
    text-align: center;
}

.wpx-bi-logged-out p { margin-bottom: 20px; font-size: 15px; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.wpx-bi-empty {
    padding: 40px 0;
    color: var(--wpx-gray-600);
    text-align: center;
}

/* ── Inquiry form wrapper ────────────────────────────────────────────────────── */
.wpx-bi-inquiry-form-wrap {
    max-width: 680px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .wpx-bi-account-wrap {
        flex-direction: column;
    }

    .wpx-bi-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 12px 0;
        border-right: none;
        border-bottom: 1px solid var(--wpx-gray-300);
    }

    .wpx-bi-sidebar-link {
        white-space: nowrap;
        padding: 8px 16px;
    }

    .wpx-bi-panel {
        padding: 24px 16px;
    }

    .wpx-bi-form-row {
        grid-template-columns: 1fr;
    }

    /* Hide table, show cards */
    .wpx-bi-table-wrap { display: none; }
    .wpx-bi-cards      { display: block; }

    /* Quote modal stacks on mobile */
    .wpx-bi-quote-inner {
        flex-direction: column;
        width: 95vw;
    }

    .wpx-bi-quote-left {
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .wpx-bi-quote-actions {
        flex-direction: column;
    }

    .wpx-bi-modal-actions {
        flex-direction: column-reverse;
    }

    .wpx-bi-inquiries-header {
        flex-direction: column;
        gap: 8px;
    }
}


/* ── Sign Out tab ─────────────────────────────────────────────────────────── */
.wpx-bi-signout-wrap {
    max-width: 620px;
    margin: 40px auto 0;
    text-align: center;
}

.wpx-bi-signout-icon {
    color: var(--wpx-gold);
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.wpx-bi-signout-title {
    font-family: var(--wpx-font);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
    color: var(--wpx-black);
}

.wpx-bi-signout-text {
    margin: 0 0 26px;
    font-size: 15px;
    color: #444;
    font-family: var(--wpx-font-sans);
}

.wpx-bi-signout-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wpx-bi-signout-btn {
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.wpx-bi-signout-btn:hover {
    text-decoration: none;
}

.wpx-bi-signout-cancel {
    margin-top: 14px;
    font-size: 11px;
    color: var(--wpx-gold-dark);
    text-decoration: underline;
    font-family: var(--wpx-font-sans);
}

.wpx-bi-signout-cancel:hover {
    color: var(--wpx-gold);
}

@media (max-width: 768px) {
    .wpx-bi-signout-wrap {
        margin-top: 10px;
    }

    .wpx-bi-signout-title {
        font-size: 28px;
    }

    .wpx-bi-signout-btn {
        max-width: 100%;
    }
}


.wpx-bi-password-extra {
    margin-top: 12px;
}

.wpx-bi-forgot-password-link {
    font-size: 13px;
    color: var(--wpx-gold-dark);
    text-decoration: underline;
}

.wpx-bi-forgot-password-link:hover {
    color: var(--wpx-gold);
}


.wpx-bi-password-form .wpx-bi-password-field {
    position: relative;
}

.wpx-bi-password-form .wpx-bi-password-field input {
    padding-right: 48px;
}

.wpx-bi-password-form .wpx-bi-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--wpx-gray-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none;
}

.wpx-bi-password-form .wpx-bi-password-toggle:hover {
    color: var(--wpx-gold-dark);
    background: transparent;
}

.wpx-bi-password-form .wpx-bi-password-toggle:focus {
    outline: none;
    color: var(--wpx-gold-dark);
}

.wpx-bi-password-form .wpx-bi-password-toggle-icon,
.wpx-bi-password-form .wpx-bi-password-toggle-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.wpx-bi-password-form .wpx-bi-password-toggle.is-visible::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: rotate(-35deg);
}
