/* ================================
   PROFILE.CSS - Openbare agent/makelaar-profielpagina.
   ================================= */

.agent-page {
    max-width: 1100px;
    margin: 28px auto 60px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- Header: foto links, info rechts ---------- */
.agent-header-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--bg-ffffff, #ffffff);
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 16px;
    padding: 24px;
}

.agent-header-photo-col {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.agent-header-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-eaf2ff, #eaf2ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-header-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-header-photo-initial {
    font-size: 42px;
    font-weight: 700;
    color: var(--tx-2b7dfa, #2b7dfa);
}

/* Vinkje = erkende/geverifieerde professionele agent. */
.agent-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-fff7ed, #fff7ed);
    color: var(--tx-c2690a, #c2690a);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.agent-verified-badge .material-symbols-outlined {
    font-size: 15px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.agent-verified-badge-muted {
    background: var(--bg-f3f4f6, #f3f4f6);
    color: var(--tx-6b7280, #6b7280);
}

.agent-header-info {
    flex: 1 1 auto;
    min-width: 0;
}

.agent-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.agent-header-name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--tx-111827, #111827);
}

.agent-header-company {
    margin-top: 2px;
    font-size: 14px;
    color: var(--tx-6b7280, #6b7280);
}

.agent-share-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    background: var(--bg-ffffff, #ffffff);
    color: var(--tx-111827, #111827);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.agent-share-btn:hover { background: var(--bg-f3f4f6, #f3f4f6); }
.agent-share-btn .material-symbols-outlined { font-size: 19px; }

/* Erkend makelaar: goud */
.agent-verified-badge-amber { background: linear-gradient(135deg, var(--bg-fff3c4, #fff3c4), #f6dc86); color: var(--tx-7a5600, #7a5600); box-shadow: inset 0 0 0 1px #e3c258; }

.agent-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.agent-rating-stars { color: var(--tx-f59e0b, #f59e0b); letter-spacing: 1px; }
.agent-rating-value { font-weight: 700; color: var(--tx-111827, #111827); }
.agent-rating-count { color: var(--tx-6b7280, #6b7280); }

.agent-meta-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--tx-374151, #374151);
}

.agent-meta-line .material-symbols-outlined {
    font-size: 18px;
    color: #9ca3af;
    flex: 0 0 auto;
    margin-top: 1px;
}

.agent-bio {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tx-374151, #374151);
}

.agent-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.agent-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    background: #2b7dfa;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.agent-contact-btn:hover { background: #1a68e0; }

.agent-contact-btn-outline {
    background: var(--bg-ffffff, #ffffff);
    color: var(--tx-2b7dfa, #2b7dfa);
    border: 1px solid var(--bd-c7ddfb, #c7ddfb);
}

.agent-contact-btn-outline:hover { background: var(--bg-eaf2ff, #eaf2ff); }

.agent-contact-btn .material-symbols-outlined { font-size: 18px; }

/* ---------- Statistieken ---------- */
.agent-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.agent-stat-card {
    background: var(--bg-ffffff, #ffffff);
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.agent-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--tx-111827, #111827);
}

.agent-stat-label {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--tx-6b7280, #6b7280);
}

/* ---------- Secties ---------- */
.agent-section-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--tx-111827, #111827);
}

.agent-empty {
    color: var(--tx-6b7280, #6b7280);
    font-size: 14px;
    background: var(--bg-ffffff, #ffffff);
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

/* ---------- Listings grid ---------- */
.agent-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.agent-listing-card {
    display: block;
    background: var(--bg-ffffff, #ffffff);
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.agent-listing-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.agent-listing-image {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
}

.agent-listing-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.75);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.agent-listing-body {
    padding: 12px 14px 14px;
}

.agent-listing-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--tx-111827, #111827);
}

.agent-listing-title {
    margin-top: 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tx-1f2937, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-listing-address {
    font-size: 14px;
    color: var(--tx-6b7280, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-listing-features {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--tx-6b7280, #6b7280);
}

/* ---------- Andere makelaars ---------- */
.agent-others-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.agent-other-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.agent-other-card:hover {
    border-color: #2b7dfa;
    transform: translateY(-2px);
}

.agent-other-avatar,
.agent-other-avatar-initial {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-other-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-eaf2ff, #eaf2ff);
    color: var(--tx-2b7dfa, #2b7dfa);
    font-weight: 700;
}

.agent-other-name { font-size: 14px; font-weight: 600; color: var(--tx-111827, #111827); }
.agent-other-company { font-size: 12.5px; color: var(--tx-6b7280, #6b7280); }

/* ---------- Mobiel ---------- */
@media (max-width: 640px) {
    .agent-page {
        margin-top: 16px;
        padding: 0 12px;
        gap: 18px;
    }

    /* Alleen de foto (+ badges eronder) staat gecentreerd; de rest van de
       info (naam, rating, adres, contact) is links uitgelijnd, niet alles
       onder elkaar gecentreerd. */
    .agent-header-card {
        flex-direction: column;
        align-items: center;
        padding: 20px 16px;
    }

    .agent-header-info {
        align-self: stretch;
        width: 100%;
    }

    .agent-header-top {
        align-items: flex-start;
    }

    .agent-badges,
    .agent-rating,
    .agent-meta-line,
    .agent-contact-row {
        justify-content: flex-start;
    }

    .agent-meta-line { text-align: left; }

    .agent-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-listings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .agent-listing-image { height: 110px; }
    .agent-listing-body { padding: 10px; }
}

@media (max-width: 420px) {
    .agent-listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Reviews ---------- */
.agent-reviews .rv-flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 14px;
}
.agent-reviews .rv-flash-ok  { background: var(--bg-ecfdf5, #ecfdf5); color: var(--tx-166534, #166534); border: 1px solid var(--bd-bbf7d0, #bbf7d0); }
.agent-reviews .rv-flash-err { background: var(--bg-fef2f2, #fef2f2); color: var(--tx-991b1b, #991b1b); border: 1px solid var(--bd-fecaca, #fecaca); }

.rv-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.rv-summary {
    padding: 20px;
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 5px;
    background: var(--bg-ffffff, #ffffff);
    text-align: center;
}

.rv-big { font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--tx-111827, #111827); letter-spacing: -0.02em; }
.rv-summary .rv-stars { font-size: 20px; margin-top: 6px; }
.rv-summary-count { margin-top: 8px; font-size: 14px; color: var(--tx-6b7280, #6b7280); line-height: 1.5; }

.rv-bars { margin-top: 16px; display: grid; gap: 6px; }
.rv-bar-row { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tx-6b7280, #6b7280); text-align: left; }
.rv-bar { height: 6px; border-radius: 999px; background: var(--bg-eef0f3, #eef0f3); overflow: hidden; }
.rv-bar > span { display: block; height: 100%; background: #f59e0b; border-radius: 999px; }
.rv-bar-n { text-align: right; }

.rv-write {
    padding: 20px;
    margin-bottom: 18px;
    border: 1px solid var(--bd-e5e7eb, #e5e7eb);
    border-radius: 5px;
    background: var(--bg-ffffff, #ffffff);
}

.rv-write-title { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--tx-111827, #111827); }
.rv-note { margin: 0 0 12px; font-size: 14px; color: var(--tx-6b7280, #6b7280); }

.rv-form textarea {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--bd-d5d7dc, #d5d7dc);
    border-radius: 5px;
    font: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}
.rv-form textarea:focus { outline: none; border-color: #2b7dfa; box-shadow: 0 0 0 3px rgba(43, 125, 250, 0.12); }

.rv-star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rv-star-input input { position: absolute; opacity: 0; pointer-events: none; }
.rv-star-input label { font-size: 30px; line-height: 1; color: #d5dae1; cursor: pointer; transition: color 0.12s ease; }
.rv-star-input label:hover,
.rv-star-input label:hover ~ label,
.rv-star-input input:checked ~ label { color: var(--tx-f59e0b, #f59e0b); }
.rv-star-input input:focus-visible + label { outline: 2px solid #2b7dfa; outline-offset: 2px; border-radius: 3px; }

.rv-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.rv-form-actions .agent-contact-btn { border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.rv-delete { border: 0; background: none; color: var(--tx-b91c1c, #b91c1c); font: inherit; font-size: 14px; cursor: pointer; }
.rv-delete:hover { text-decoration: underline; }

.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rv-item { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--bd-e5e7eb, #e5e7eb); border-radius: 5px; background: var(--bg-ffffff, #ffffff); }

.rv-item-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-eaf2ff, #eaf2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--tx-2b7dfa, #2b7dfa);
}
.rv-item-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.rv-item-body { min-width: 0; flex: 1 1 auto; }
.rv-item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; font-size: 14px; color: var(--tx-111827, #111827); }
.rv-item-date { margin-left: auto; font-size: 12.5px; color: #9ca3af; }
.rv-you { padding: 1px 8px; border-radius: 999px; background: var(--bg-eaf2ff, #eaf2ff); color: var(--tx-2b7dfa, #2b7dfa); font-size: 11.5px; font-weight: 600; }
.rv-item-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--tx-374151, #374151); overflow-wrap: anywhere; }

.agent-header-info .rv-rating-line { margin-top: 12px; }
.agent-header-info .rv-rating-line a { text-decoration: none; }

@media (max-width: 800px) {
    .rv-layout { grid-template-columns: 1fr; }
}
