﻿/* =========================================================
   NHAWOW - AGENT / OWNER LIST PAGE
   Scope: Views/Agent/Index.cshtml
   Note: Main search/list/pagination layout reuses Property/List.css
========================================================= */


/* Agent page must show the floating chatbox.
   Property/List.css hides .hn-chatbox because the list page does not need it,
   but Agent/Index reuses that CSS and still needs direct chat with the agent. */

 li {
    font-family: var(--font-body);
    font-size: 14px !important;
}

.hn-chatbox {
    display: block;
}

.agent-list-page {
    --nhawow-profile-avatar-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --nhawow-profile-avatar-text: #9f1239;
    color: #0f172a;
}

.agent-list-search {
    margin-top: 0;
}

.agent-list-toolbar .list-head-actions {
    gap: 10px;
}

.agent-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.agent-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    padding: 28px;
    background: #fff;
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: 20px;
    color: #64748b;
    text-align: center;
}

    .agent-list-empty i {
        font-size: 34px;
        color: #94a3b8;
    }

    .agent-list-empty p {
        margin: 0;
        font-weight: 700;
        line-height: 1.55;
    }
@media (max-width: 770px) {
    .agent-list-toolbar .list-head-actions {
        gap: 6px;
    }

    .agent-list-count {
        display: none;
    }
}

@media (max-width: 391px) {
    .agent-list-toolbar h2 {
        max-width: calc(100vw - 118px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== Agent profile summary card ===== */
.agent-profile-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main side"
        "actions side";
    gap: 22px 28px;
    align-items: center;
    margin: 18px 0 18px;
    padding: 26px 30px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}

.agent-profile-main {
    grid-area: main;
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.agent-profile-avatar {
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--nhawow-profile-avatar-bg);
    border: 6px solid #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .11);
    color: var(--nhawow-profile-avatar-text);
    font-size: 40px;
    font-weight: 900;
}

    .agent-profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.agent-profile-info {
    min-width: 0;
}

    .agent-profile-info h1 {
        margin: 0 0 9px;
        color: #0f172a;
        font-size: clamp(24px, 3vw, 36px);
        font-weight: 900;
        line-height: 1.05;
        letter-spacing: -.03em;
    }

.agent-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 15px;
    border-radius: 8px;
    color: #fff;
    font-size: clamp(14px, 1.35vw, 18px);
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(4, 123, 111, .22);
}

    .agent-profile-badge i {
        font-size: .86em;
    }

.agent-profile-side {
    grid-area: side;
    min-width: 250px;
    padding-left: 28px;
    border-left: 1px solid rgba(15, 23, 42, .12);
}

.agent-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(15, 23, 42, .10);
}

.agent-profile-stat {
    min-width: 0;
}

    .agent-profile-stat span,
    .agent-profile-share > span {
        display: block;
        margin-bottom: 8px;
        color: #334155;
        font-size: 16px;
        font-weight: 500;
    }

    .agent-profile-stat strong {
        display: block;
        color: #020617;
        font-size: 38px;
        font-weight: 900;
        line-height: 1;
    }

.agent-profile-stat--views strong {
    font-size: 32px;
}

.agent-profile-share-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .agent-profile-share-icons a,
    .agent-profile-share-icons button {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        text-decoration: none;
        background: #edf2f7;
        color: #64748b;
        font-size: 18px;
        font-weight: 900;
        transition: .18s ease;
    }

        .agent-profile-share-icons a:first-child {
            background: #1877f2;
            color: #fff;
        }

    .agent-profile-share-icons .agent-share-zalo {
        background: #e8f2ff;
        color: #0a65cc;
        font-size: 14px;
    }

    .agent-profile-share-icons a:hover,
    .agent-profile-share-icons button:hover,
    .agent-profile-share-icons button.is-copied {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
    }

.agent-profile-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 134px;
}

.agent-profile-btn {
    min-width: 172px;
    min-height: 50px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
    transition: .18s ease;
}

    .agent-profile-btn:hover {
        transform: translateY(-1px);
        text-decoration: none;
    }

.agent-profile-btn--chat {
    background: #0575e6;
}

.agent-profile-btn--phone {
    background: #16a34a;
}

@media (max-width: 900px) {
    .agent-profile-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "side"
            "actions";
        padding: 20px;
        gap: 8px;
    }

    .agent-profile-side {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        min-width: 0;
        padding-left: 0;
        padding-top: 5px;
        border-left: 0;
        border-top: 1px solid rgba(15, 23, 42, .10);
    }

    .agent-profile-stats {
        flex: 1 1 auto;
        grid-template-columns: repeat(2, minmax(74px, 1fr));
        gap: 12px;
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 0;
    }

    .agent-profile-actions {
        padding-left: 0;
    }
}

@media (max-width: 575px) {
    .agent-profile-card {
        margin: 12px 0 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .agent-profile-main {
        gap: 14px;
        align-items: flex-start;
    }

    .agent-profile-avatar {
        width: 74px;
        height: 74px;
        flex-basis: 74px;
        border-width: 4px;
        font-size: 28px;
    }

    .agent-profile-info h1 {
        margin-bottom: 8px;
        font-size: 26px;
    }

    .agent-profile-badge {
        min-height: 32px;
        padding: 0 12px;
        border-radius: 8px;
        font-size: 15px;
    }

    .agent-profile-side {
        align-items: flex-start;
        gap: 12px;
    }

    .agent-profile-stats {
        gap: 10px;
    }

    .agent-profile-stat span,
    .agent-profile-share > span {
        font-size: 13px;
    }

    .agent-profile-stat strong {
        font-size: 30px;
    }

    .agent-profile-stat--views strong {
        font-size: 22px;
    }

    .agent-profile-share-icons {
        gap: 8px;
    }

        .agent-profile-share-icons a,
        .agent-profile-share-icons button {
            width: 34px;
            height: 34px;
            font-size: 14px;
        }

    .agent-profile-actions {
        gap: 10px;
    }

    .agent-profile-btn {
        flex: 1 1 0;
        min-width: 0;
        min-height: 46px;
        padding: 0 12px;
        border-radius: 9px;
        font-size: 16px;
    }
    .agent-level-step-benefits li {
        font-size: 9px !important;
    }
}



/* =========================================================
   Agent profile card uses the same color/effect tokens as level cards
========================================================= */
.agent-profile-card.agent-level-surface {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: var(--agent-level-border, rgba(15, 23, 42, .08));
    background: var(--agent-level-bg, #fff);
    color: var(--agent-level-fg, #0f172a);
    box-shadow: var(--agent-level-shadow, 0 16px 42px rgba(15, 23, 42, .08)), 0 16px 42px rgba(15, 23, 42, .10);
}

.agent-profile-card.agent-level-surface::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: -120%;
    left: -38%;
    width: 34%;
    height: 340%;
    transform: rotate(25deg);
    background: linear-gradient(transparent, var(--agent-level-sweep, rgba(255, 255, 255, .25)), transparent);
    animation: agentLevelSweep 6s linear infinite;
    pointer-events: none;
}

.agent-profile-card.agent-level-surface::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 1;
    border-radius: 23px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 58%);
    pointer-events: none;
}

.agent-profile-card.agent-level-surface > * {
    position: relative;
    z-index: 2;
}

.agent-profile-card.agent-level-surface .agent-profile-info h1,
.agent-profile-card.agent-level-surface .agent-profile-stat strong {
    color: var(--agent-level-title, #0f172a);
}

.agent-profile-card.agent-level-surface .agent-profile-stat span,
.agent-profile-card.agent-level-surface .agent-profile-share > span {
    color: var(--agent-level-desc, #334155);
}

.agent-profile-card.agent-level-surface .agent-profile-side {
    border-left-color: color-mix(in srgb, var(--agent-level-border, #e5e7eb) 62%, transparent);
}

.agent-profile-card.agent-level-surface .agent-profile-stats {
    border-bottom-color: color-mix(in srgb, var(--agent-level-border, #e5e7eb) 62%, transparent);
}

.agent-profile-share-icons button {
    position: relative;
}

.agent-copy-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .18);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.agent-copy-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f172a;
}

.js-agent-copy-link.is-copied .agent-copy-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
    .agent-profile-card.agent-level-surface .agent-profile-side {
        border-left: 0;
        border-top-color: color-mix(in srgb, var(--agent-level-border, #e5e7eb) 62%, transparent);
    }
}
