/**
 * Premium Residency Insurance Inquiry - Styles
 * Modern design: blue accent, rounded corners, card layout.
 */

/* Preloader - center on screen (master page element) */
#preloader {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

    #preloader .loader-logo {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

.premium-residency-inquiry {
    font-family: var(--font-family);
    max-width: 1132px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
}

.pri-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #212529;
}

.pri-description {
    color: #6C757D;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Tabs - use Tailwind: flex rounded-lg border border-gray-200 bg-white p-1 mb-5
   Active: bg-blue-50 text-blue-600 border border-blue-600 font-semibold
   Inactive: text-gray-500 border-transparent hover:bg-gray-50 */

/* Input with icon */
.pri-input-group {
    margin-bottom: 1.25rem;
    padding: 0 1rem;
}

.pri-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.pri-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
}

    .pri-input-wrapper .pri-input-icon {
        position: absolute;
        left: 14px;
        width: 20px;
        height: 20px;
        color: #5F6368;
        pointer-events: none;
        font-size: 18px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pri-input-wrapper .pri-input {
        width: 100%;
        max-width: 100%;
        padding: 12px 16px 12px 44px;
        border: 1px solid #DADCE0;
        border-radius: 8px;
        font-size: 1rem;
        background: #fff;
    }

        .pri-input-wrapper .pri-input::placeholder {
            color: #80868B;
        }

        .pri-input-wrapper .pri-input:focus {
            border-color: #163e37;
            outline: none;
        }

.pri-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    font-size: 1rem;
}

    .pri-input:focus {
        border-color: #163e37;
        outline: none;
    }

/* reCAPTCHA area (v3 is invisible; styled container for badge/note) */
.pri-recaptcha-group {
    margin-bottom: 1.25rem;
    padding: 12px 16px;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    background: #fff;
}

.pri-recaptcha-note {
    font-size: 0.85rem;
    color: #80868B;
}

/* Terms checkbox */
.pri-checkbox-group {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

    .pri-checkbox-group .pri-checkbox {
        margin-right: 8px;
        vertical-align: middle;
        margin-left: 8px;
    }

.pri-checkbox-label {
    font-size: 0.95rem;
    color: #5F6368;
}

    .pri-checkbox-label a {
        color: #1A73E8;
        text-decoration: underline;
    }

        .pri-checkbox-label a:hover {
            color: #1557B0;
        }

.pri-checkbox-sublabel {
    display: block;
    font-size: 0.85rem;
    color: #80868B;
    margin-top: 4px;
    margin-left: 28px;
}

.pri-error {
    color: #DC3545;
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

/* Primary button */
.pri-actions {
    margin-top: 1.5rem;
    padding: 0 1rem;
    text-align: center;
}

.pri-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.pri-btn-primary {
    width: 100%;
    background: #163e37;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgb(145 151 150 / 16%);
}

    .pri-btn-primary:hover {
        background: #163e37a8;
    }

    .pri-btn-primary:disabled {
        opacity: 0.7;
        background: #f3f4f6;
        cursor: not-allowed;
        color: #aeb8d3;
        box-shadow: none;
    }



.pri-btn-secondary {
    background: #F8F9FA;
    color: #333;
    border: 1px solid #DADCE0;
}

    .pri-btn-secondary:hover {
        background: #E8EAED;
    }

/* Results card */
.pri-results-panel {
    margin-top: 1.5rem;
}

.pri-results-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #d2d6db;
    min-height: 23rem;
}

.pri-results-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 0px solid #163e37;
    background: #96f34d;
    /* box-shadow: 0 2px 20px 20px rgb(150 243 77 / 22%); */
}

.pri-provider-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pri-provider-icon {
    width: 40px;
    height: 40px;
    background: #7fd53b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #163e37;
    flex-shrink: 0;
}

.pri-provider-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #163e37;
    letter-spacing: 0.5px;
}

.pri-provider-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.pri-status-section {
    text-align: right;
}

.pri-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .pri-status-pill.active {
        background: #28A745;
        color: #fff;
    }

    .pri-status-pill.expired {
        background: #DC3545;
        color: #fff;
    }

.pri-status-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.pri-verified-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6C757D;
    margin-top: 4px;
}

.pri-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.pri-card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #F8F9FA;
    color: #007BFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pri-card-action-btn:hover {
        background: #E9ECEF;
    }

/* New Query button - center in results panel */
.pri-results-panel .pri-actions {
    display: flex;
    justify-content: center;
}

/* Results row: card + identification panel side by side */
.pri-results-row {
    display: grid;
    gap: 20px;
    align-items: start;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .pri-results-row {
        grid-template-columns: 1fr;
    }
}

/* Policy details - card body */
.pri-card-body {
    padding: 24px;
}

.pri-card-main {
    display: grid;
    grid-template-columns: 0.5fr 0.5fr 1fr;
    gap: 8px;
    align-items: start;
}

@media (max-width: 600px) {
    .pri-card-main {
        grid-template-columns: 1fr;
    }
}

.pri-policy-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pri-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pri-detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6C757D;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pri-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
}

    .pri-detail-value.expiry {
        color: #DC3545;
    }

/* Policy timeline */
.pri-timeline-section {
    /* padding: 0; */
    padding: 3rem 0;
}

.pri-timeline-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6C757D;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pri-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

    .pri-timeline::before {
        content: '';
        position: absolute;
        top: 16px;
        left: 24px;
        right: 24px;
        height: 2px;
        background: #E9ECEF;
    }

.pri-timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.pri-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E9ECEF;
    color: #163e37;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pri-timeline-point.active .pri-timeline-icon {
    background: #163e37;
    color: #fff;
}

.pri-timeline-point.expiry .pri-timeline-icon {
    color: #163e37;
}

.pri-timeline-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #6C757D;
}

.pri-timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.pri-timeline-point.expiry .pri-timeline-date {
    color: #3e403d;
}

/* Identification panel - right side of card */
.pri-identification-panel {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 24px;
    /* border-left: 4px solid #163e37; */
}

.pri-identification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    /* padding-bottom: 14px; */
    border-bottom: 0px solid #e2e8f0;
    padding: 1.5rem;
    background: #96f34d;
    border-radius: 12px 12px 0 0;
    /* box-shadow: -1px -3px 20px 20px rgb(150 243 77 / 22%); */
}

.pri-identification-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: #7fd53b;
    color: #fff;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.pri-identification-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #334155;
}

.pri-identification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pri-identification-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    /* background: #f8fafc; */
    border-radius: 8px;
    /* border: 1px solid #e2e8f0; */
}

.pri-id-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.4px;
}

.pri-id-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.pri-renew-link {
    display: inline-block;
    margin-top: 16px;
    color: #007BFF;
    font-size: 0.9rem;
    text-decoration: none;
}

    .pri-renew-link:hover {
        text-decoration: underline;
    }

.pri-no-results {
    display: block;
    color: #4ead04;
    margin-bottom: 1rem;
    padding: 20px;
    text-align: center;
    border: 1px solid #65e103;
    border-radius: 12px;
    background: #f2fff3;
}

/* Table fallback (for repeater) */
.pri-results-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.pri-results-table {
    width: 100%;
    border-collapse: collapse;
}

    .pri-results-table th,
    .pri-results-table td {
        padding: 12px 16px;
        border: 1px solid #E9ECEF;
        text-align: left;
    }

    .pri-results-table th {
        background: #F8F9FA;
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #6C757D;
    }

    .pri-results-table tr:hover {
        background: #F8F9FA;
    }

.pri-results-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #212529;
}

/* Error panel */
.pri-error-panel {
    padding: 20px 24px;
    background: #FFF5F5;
    border: 1px solid #FCC;
    border-radius: 8px;
    margin-top: 1rem;
}

.pri-error-message {
    color: #DC3545;
    display: block;
    margin-bottom: 1rem;
    text-align: center;
}

.pri-form-panel {
    max-width: 600px;
    margin: 0 auto;
}
