/* Agent mini-site overrides on top of StickyMobile */

:root {
    --sa-purple: #5E4B8B;
    --sa-purple-dark: #4a3a6f;
    --sa-purple-light: #9d8fc4;
    --sa-green: #7AC943;
    --sa-green-dark: #65a838;
    --sa-text: #1c1c1e;
    --sa-text-muted: #5a5a5f;
    --sa-hero-bg: #1a1a1f;
    --sa-hero-bg-end: #24242b;
}

/* ---- Smart Agent color system (overrides highlight_green) ---- */

#page .vcard-title.color-highlight,
#page .sa-agent-section-title {
    color: var(--sa-text) !important;
}

.theme-dark #page .vcard-title.color-highlight,
.theme-dark #page .sa-agent-section-title {
    color: #f2f2f3 !important;
}

#page .sa-agent-company-card .color-highlight {
    color: var(--sa-purple) !important;
}

#page .sa-agent-enquiry-submit.bg-highlight,
#page .sa-agent-enquiry-submit.btn-primary {
    background-color: var(--sa-purple) !important;
    color: #fff !important;
    border: none !important;
}

#page .sa-agent-enquiry-submit.bg-highlight:hover,
#page .sa-agent-enquiry-submit.btn-primary:hover {
    background-color: var(--sa-purple-dark) !important;
}

#page .sa-agent-btn-disabled.bg-highlight,
#page .sa-agent-btn-disabled.btn-secondary {
    background-color: #9e9ea3 !important;
    color: #fff !important;
}

@media (min-width: 768px) {
    #page {
        max-width: 920px;
        margin: 0 auto;
        box-shadow: 0 0 48px rgba(0, 0, 0, 0.08);
    }
}

/* ---- Profile hero (dark premium) ---- */

.sa-agent-hero-dark {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        120deg,
        #2d2648 0%,
        #241f34 20%,
        var(--sa-hero-bg) 50%,
        #1c2420 72%,
        #1f3328 88%,
        #264032 100%
    );
    color: #f4f4f5;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.sa-agent-hero-dark::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -8%;
    width: 58%;
    height: 140%;
    background: radial-gradient(
        ellipse at center,
        rgba(94, 75, 139, 0.28) 0%,
        rgba(94, 75, 139, 0.08) 42%,
        transparent 72%
    );
    pointer-events: none;
}

.sa-agent-hero-dark::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(94, 75, 139, 0.45) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.sa-agent-hero-accent {
    position: relative;
    z-index: 1;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--sa-purple) 0%,
        var(--sa-purple) 88%,
        var(--sa-green) 100%
    );
}

.sa-agent-hero-inner {
    position: relative;
    z-index: 1;
    padding: 18px 16px 20px;
}

.sa-agent-hero-visual-col {
    padding-bottom: 2px;
}

.sa-agent-hero-logo-frame {
    background: #ffffff;
    border: none;
    padding: 8px;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    line-height: 0;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.sa-agent-hero-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    object-position: center center;
}

.sa-agent-hero-details {
    text-align: center;
}

.sa-agent-hero-name {
    color: #ffffff !important;
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 10px !important;
}

.sa-agent-hero-meta {
    color: rgba(244, 244, 245, 0.72);
    line-height: 1.45;
}

.sa-agent-hero-icon {
    color: var(--sa-purple-light) !important;
}

.sa-agent-hero-actions {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.sa-agent-hero-actions .btn {
    padding-top: 9px;
    padding-bottom: 9px;
    line-height: 1.1;
}

.sa-agent-hero-dark .sa-agent-btn-call {
    background-color: var(--sa-purple) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(94, 75, 139, 0.38);
}

.sa-agent-hero-dark .sa-agent-btn-call:hover {
    background-color: var(--sa-purple-dark) !important;
    color: #fff !important;
}

.sa-agent-hero-dark .sa-agent-btn-enquiry {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #f0edf6 !important;
    border: 1.5px solid rgba(157, 143, 196, 0.55) !important;
    box-shadow: none;
}

.sa-agent-hero-dark .sa-agent-btn-enquiry:hover {
    background-color: rgba(94, 75, 139, 0.32) !important;
    border-color: var(--sa-purple-light) !important;
    color: #fff !important;
}

@media (min-width: 768px) {
    .sa-agent-hero-inner {
        padding: 22px 22px 24px;
    }

    .sa-agent-hero-details {
        text-align: left;
        padding-left: 6px;
    }

    .sa-agent-hero-name {
        font-size: 34px;
    }

    .sa-agent-hero-actions {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (min-width: 992px) {
    .sa-agent-hero-name {
        font-size: 38px;
    }
}

/* ---- Insurance Services ---- */

#divInsuranceCategories .content > .content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
}

#divInsuranceCategories .row.mb-0 {
    --bs-gutter-x: 14px;
    --bs-gutter-y: 10px;
    margin-bottom: 0 !important;
}

#divInsuranceCategories .col-6 {
    margin-bottom: 0;
    display: flex;
}

#divInsuranceCategories .row .card.card-style {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 12px 10px 10px !important;
    text-align: left !important;
    background: #ffffff;
    border: 1px solid rgba(94, 75, 139, 0.14);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

#divInsuranceCategories .row .card.card-style.text-center {
    text-align: left !important;
}

#divInsuranceCategories .row .card.card-style > i.fa {
    display: none !important;
}

#divInsuranceCategories .row .card.card-style::before {
    content: "";
    order: 1;
    flex: 0 0 3px;
    align-self: stretch;
    width: 3px;
    min-height: 20px;
    background: var(--sa-purple);
    border-radius: 1px;
}

#divInsuranceCategories .row .card.card-style::after {
    content: "\f3ed";
    order: 2;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1;
    color: var(--sa-purple);
}

#divInsuranceCategories .row .card.card-style h2 {
    order: 3;
    flex: 0 1 auto;
    min-width: 0;
    padding-top: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    text-align: left !important;
    color: var(--sa-text) !important;
}

@media (max-width: 575.98px) {
    #divInsuranceCategories .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 576px) {
    #divInsuranceCategories .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---- Insurance Companies ---- */

#divInsurabceCompany .content > .content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
}

#divInsurabceCompany .row.mb-0 {
    --bs-gutter-x: 14px;
    --bs-gutter-y: 10px;
    margin-bottom: 0 !important;
}

#divInsurabceCompany .col-6 {
    margin-bottom: 0;
    display: flex;
}

#divInsurabceCompany .sa-agent-company-card.card.card-style {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 12px 10px 10px !important;
    text-align: left !important;
    background: #ffffff;
    border: 1px solid rgba(94, 75, 139, 0.14);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

#divInsurabceCompany .sa-agent-company-card > i.fa {
    display: none !important;
}

#divInsurabceCompany .sa-agent-company-card::before {
    content: "";
    order: 1;
    flex: 0 0 3px;
    align-self: stretch;
    width: 3px;
    min-height: 20px;
    background: var(--sa-purple);
    border-radius: 1px;
}

#divInsurabceCompany .sa-agent-company-card::after {
    content: "\f1ad";
    order: 2;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1;
    color: var(--sa-purple);
}

#divInsurabceCompany .sa-agent-company-card span {
    order: 3;
    flex: 0 1 auto;
    min-width: 0;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    text-align: left !important;
    color: var(--sa-text) !important;
}

@media (max-width: 575.98px) {
    #divInsurabceCompany .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 576px) {
    #divInsurabceCompany .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---- Remaining sections (unchanged for now) ---- */

.sa-agent-section-heading {
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: inherit;
}

.sa-agent-company-card {
    text-align: center;
    padding: 18px 12px;
}

.sa-agent-company-card i {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.sa-agent-company-card span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.sa-agent-gallery-grid img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.03);
}

.sa-agent-phone-reveal {
    cursor: pointer;
    width: 100%;
}

.sa-agent-phone-reveal .sa-phone-hint {
    display: block;
    font-size: 11px;
    opacity: 0.55;
    margin-top: 2px;
}

.sa-agent-phone-reveal.revealed .sa-phone-hint {
    display: none;
}

.sa-agent-powered {
    text-align: center;
    font-size: 12px;
    opacity: 0.65;
    padding: 20px 16px 28px;
}

.sa-agent-powered a {
    color: var(--sa-purple);
    font-weight: 600;
    text-decoration: none;
}

.sa-agent-powered a:hover {
    color: var(--sa-purple-dark);
}

.sa-agent-legacy-section .sa-agent-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sa-agent-legacy-section .sa-agent-section-intro {
    font-size: 13px;
    opacity: 0.65;
    margin-bottom: 16px;
}

/* ---- Send an Enquiry ---- */

.sa-agent-enquiry-section .sa-agent-enquiry-input {
    background: #ffffff;
    border: 1px solid rgba(94, 75, 139, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--sa-text);
    box-shadow: none;
    min-height: 42px;
}

.sa-agent-enquiry-section .sa-agent-enquiry-input:focus {
    border-color: rgba(94, 75, 139, 0.45);
    box-shadow: 0 0 0 3px rgba(94, 75, 139, 0.1);
    outline: none;
}

.sa-agent-enquiry-section .sa-agent-enquiry-message {
    min-height: 84px;
    max-height: 120px;
    resize: vertical;
}

.sa-agent-enquiry-section .sa-agent-captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sa-agent-enquiry-section .sa-agent-captcha-input {
    flex: 0 0 160px;
    width: 160px;
    max-width: 100%;
}

.sa-agent-enquiry-section .sa-agent-captcha-panel {
    display: inline-block;
    flex: 0 0 auto;
}

.sa-agent-enquiry-section .sa-agent-captcha-visual {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sa-agent-enquiry-section .sa-agent-captcha-refresh {
    padding: 4px;
    border: 0;
    background: transparent;
}

.sa-agent-enquiry-section .sa-agent-enquiry-submit {
    min-width: 148px;
    padding: 11px 22px;
    font-size: 14px;
    letter-spacing: 0.01em;
    text-transform: none;
}

.sa-agent-enquiry-section .sa-agent-enquiry-submit-row {
    padding-bottom: 10px;
}

.sa-agent-enquiry-section > .content {
    padding-bottom: 20px;
}

@media (max-width: 767.98px) {
    .sa-agent-enquiry-section .sa-agent-captcha-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sa-agent-enquiry-section .sa-agent-captcha-input {
        flex: 1 1 auto;
        width: 100%;
    }

    .sa-agent-enquiry-section .sa-agent-captcha-visual {
        justify-content: flex-start;
    }

    .sa-agent-enquiry-section .sa-agent-enquiry-submit {
        width: 100%;
    }
}

.sa-agent-enquiry-panel .form-control.round-small {
    border-radius: 10px !important;
}

/* ---- Contact ---- */

.sa-agent-contact-section .sa-agent-contact-grid {
    margin-bottom: 0;
}

.sa-agent-contact-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    height: 100%;
    padding: 11px 12px;
    background: #ffffff;
    border: 1px solid rgba(94, 75, 139, 0.14);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
}

.sa-agent-contact-link {
    display: flex;
}

.sa-agent-contact-icon {
    flex: 0 0 auto;
    width: 18px;
    margin-top: 2px;
    font-size: 15px;
    line-height: 1;
    color: var(--sa-purple);
    text-align: center;
}

.sa-agent-contact-body {
    flex: 1;
    min-width: 0;
}

.sa-agent-contact-label {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    color: var(--sa-text-muted);
    margin-bottom: 3px;
}

.sa-agent-contact-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sa-text);
    word-break: break-word;
}

.sa-agent-contact-section .sa-agent-phone-reveal {
    cursor: pointer;
}

.sa-agent-contact-section .sa-agent-phone-reveal .sa-phone-hint {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    color: var(--sa-text-muted);
    opacity: 0.75;
    margin-top: 3px;
}

.sa-agent-contact-section .sa-agent-phone-reveal.revealed .sa-phone-hint {
    display: none;
}

.sa-agent-contact-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 2px 2px;
}

.sa-agent-contact-social .sa-agent-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 1;
}

.sa-agent-contact-social .sa-agent-social-link i {
    line-height: 1;
}

.sa-agent-btn-disabled {
    opacity: 0.55;
    pointer-events: none;
}
