/**
 * Estilos do plugin ngs-experts.
 * Usa design tokens do tema (--color-*, --space-*, --radius-*).
 * Classes namespaced: .ngs-expert-*, .ngs-reviewer-*
 */

/* ── Reviewer box (no fim do artigo) ───────────────────────────────────── */
.ngs-reviewer-box {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: var(--ngs-space-4);
    align-items: start;
    padding: var(--ngs-space-6);
    margin: var(--ngs-space-8) 0 var(--ngs-space-4);
    background: var(--ngs-success-tint);
    border: 1px solid var(--ngs-success);
    border-radius: var(--ngs-radius-lg);
    position: relative;
}

.ngs-reviewer-box__badge {
    position: absolute;
    top: -12px;
    left: var(--ngs-space-4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--ngs-success);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
}

.ngs-reviewer-box__badge svg { fill: none; stroke: currentColor; }

.ngs-reviewer-box__photo img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ngs-reviewer-box__info { min-width: 0; }

.ngs-reviewer-box__name {
    margin: 0 0 var(--ngs-space-1);
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--ngs-ink);
}

.ngs-reviewer-box__name a {
    color: inherit;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.ngs-reviewer-box__name a:hover { border-bottom-color: var(--ngs-success); }

.ngs-reviewer-box__role {
    margin: 0 0 var(--ngs-space-2);
    font-size: 0.9375rem;
    color: var(--ngs-ink-soft);
    font-weight: 500;
}

.ngs-reviewer-box__bio {
    margin: 0 0 var(--ngs-space-2);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ngs-ink);
}

.ngs-reviewer-box__date {
    margin: 0 0 var(--ngs-space-2);
    font-size: 0.8125rem;
    color: var(--ngs-ink-soft);
    font-style: italic;
}

.ngs-reviewer-box__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ngs-space-2);
    margin-top: var(--ngs-space-2);
}

.ngs-reviewer-box__profile,
.ngs-reviewer-box__consultation {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--ngs-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ngs-reviewer-box__profile {
    color: var(--ngs-success);
    border: 1px solid var(--ngs-success);
    background: transparent;
}

.ngs-reviewer-box__profile:hover {
    background: var(--ngs-success);
    color: #fff;
}

.ngs-reviewer-box__consultation {
    background: var(--ngs-primary);
    color: #fff;
}

.ngs-reviewer-box__consultation:hover { background: var(--ngs-primary-deep); }

@media (max-width: 600px) {
    .ngs-reviewer-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ngs-reviewer-box__photo {
        margin: 0 auto;
    }
    .ngs-reviewer-box__actions { justify-content: center; }
}

/* ── Author box reduzido quando há revisor ─────────────────────────────── */
body.has-reviewer .author-box {
    opacity: 0.85;
    padding-top: var(--ngs-space-4);
    border-top: 1px dashed var(--ngs-line);
    margin-top: var(--ngs-space-4);
}

body.has-reviewer .author-box__avatar {
    width: 48px !important;
    height: 48px !important;
}

body.has-reviewer .author-box__label {
    font-size: 0.75rem;
    color: var(--ngs-ink-soft);
}

body.has-reviewer .author-box__name {
    font-size: 1rem;
    font-weight: 600;
}

body.has-reviewer .author-box__bio {
    font-size: 0.8125rem;
    color: var(--ngs-ink-soft);
}

/* ── Archive especialistas ─────────────────────────────────────────────── */
.ngs-expert-archive {
    padding: var(--ngs-space-12) 0;
}

.ngs-expert-archive__header {
    text-align: center;
    margin-bottom: var(--ngs-space-12);
}

.ngs-expert-archive__title {
    margin: 0 0 var(--ngs-space-2);
    font-size: 2.25rem;
    color: var(--ngs-ink);
}

.ngs-expert-archive__desc {
    margin: 0 auto;
    max-width: 640px;
    color: var(--ngs-ink-soft);
    font-size: 1.0625rem;
    line-height: 1.5;
}

.ngs-expert-group {
    margin-bottom: var(--ngs-space-12);
}

.ngs-expert-group__title {
    margin: 0 0 var(--ngs-space-6);
    padding-bottom: var(--ngs-space-2);
    font-size: 1.5rem;
    color: var(--ngs-primary);
    border-bottom: 2px solid var(--ngs-primary-tint);
}

.ngs-expert-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--ngs-space-6);
}

.ngs-expert-card {
    background: var(--ngs-paper);
    border: 1px solid var(--ngs-line);
    border-radius: var(--ngs-radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ngs-expert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ngs-expert-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: var(--ngs-space-6);
    text-align: center;
}

.ngs-expert-card__photo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--ngs-space-4);
    border-radius: 50%;
    overflow: hidden;
    background: var(--ngs-paper-sunken);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ngs-expert-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ngs-expert-card__photo--placeholder {
    color: var(--ngs-ink-soft);
}

.ngs-expert-card__name {
    margin: 0 0 var(--ngs-space-1);
    font-size: 1.0625rem;
    color: var(--ngs-ink);
}

.ngs-expert-card__specialties {
    margin: 0 0 4px;
    font-size: 0.875rem;
    color: var(--ngs-ink-soft);
    line-height: 1.3;
}

.ngs-expert-card__registry {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ngs-primary);
    font-weight: 600;
}

/* ── Single especialista ───────────────────────────────────────────────── */
.ngs-expert-single {
    padding: var(--ngs-space-12) 0;
}

.ngs-expert-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--ngs-space-8);
    align-items: start;
    margin-bottom: var(--ngs-space-12);
}

.ngs-expert-header__photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ngs-expert-header__name {
    margin: 0 0 var(--ngs-space-2);
    font-size: 2rem;
    color: var(--ngs-ink);
}

.ngs-expert-header__role {
    margin: 0 0 var(--ngs-space-1);
    font-size: 1.125rem;
    color: var(--ngs-primary);
    font-weight: 600;
}

.ngs-expert-header__specialties {
    color: var(--ngs-ink-soft);
    font-weight: 400;
}

.ngs-expert-header__registry {
    margin: 0 0 var(--ngs-space-2);
    font-size: 0.9375rem;
    color: var(--ngs-ink-soft);
}

.ngs-expert-header__excerpt {
    margin: var(--ngs-space-2) 0 var(--ngs-space-4);
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ngs-ink);
    font-style: italic;
}

.ngs-expert-header__inactive {
    margin: 0 0 var(--ngs-space-4);
    padding: var(--ngs-space-2) var(--ngs-space-4);
    background: var(--ngs-paper-sunken);
    color: var(--ngs-ink-soft);
    border-radius: var(--ngs-radius-sm);
    font-size: 0.875rem;
}

.ngs-expert-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ngs-space-2);
    margin-top: var(--ngs-space-4);
}

.ngs-expert-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--ngs-ink-soft);
    background: var(--ngs-paper);
    border: 1px solid var(--ngs-line);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ngs-expert-social-icon:hover {
    color: var(--ngs-success);
    border-color: var(--ngs-success);
    background: var(--ngs-success-tint);
}

.ngs-expert-social-icon svg { display: block; }

.ngs-expert-bio {
    max-width: 760px;
    margin: 0 0 var(--ngs-space-12);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ngs-ink);
}

.ngs-expert-bio__title {
    margin: 0 0 var(--ngs-space-4);
    font-size: 1.5rem;
    color: var(--ngs-ink);
}

.ngs-expert-bio p { margin-bottom: var(--ngs-space-4); }

.ngs-expert-reviewed {
    padding-top: var(--ngs-space-8);
    border-top: 1px solid var(--ngs-line);
}

.ngs-expert-reviewed__title {
    margin: 0 0 var(--ngs-space-6);
    font-size: 1.5rem;
    color: var(--ngs-ink);
}

.ngs-expert-reviewed__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--ngs-space-4);
}

.ngs-expert-reviewed__link {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--ngs-line);
    border-radius: var(--ngs-radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.ngs-expert-reviewed__link:hover { border-color: var(--ngs-primary); }

.ngs-expert-reviewed__thumb {
    aspect-ratio: 16 / 9;
    background: var(--ngs-paper-sunken);
}

.ngs-expert-reviewed__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ngs-expert-reviewed__heading {
    margin: 0;
    padding: var(--ngs-space-4);
    font-size: 1rem;
    line-height: 1.3;
    color: var(--ngs-ink);
}

@media (max-width: 700px) {
    .ngs-expert-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ngs-expert-header__photo { margin: 0 auto; }
    .ngs-expert-header__actions { justify-content: center; }
}
