/* ============================================================================
   Reputación de dos lados — sello público + panel del negocio.
   Mobile-first, BEM, sin !important. Pilar reputación (Fase 2).
   ============================================================================ */

/* --- Sello público de sucursal (branch.php) -------------------------------- */

.branch-seal {
    --branch-seal-color: #22a06b;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem 0.25rem 0.45rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    color: var(--branch-seal-color);
    background: color-mix(in srgb, var(--branch-seal-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--branch-seal-color) 35%, transparent);
    white-space: nowrap;
    vertical-align: middle;
}

.branch-seal__icon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
}

.branch-seal__icon svg {
    width: 100%;
    height: 100%;
}

.branch-seal__label {
    letter-spacing: 0.01em;
}

/* --- Panel del negocio (sucursal.php) -------------------------------------- */

.rep-panel {
    --rep-tier-color: #22a06b;
    margin: 1rem 0;
    padding: 1.1rem;
    border: 1px solid var(--border-color, #e3e6ea);
    border-radius: 14px;
    background: var(--surface-color, #fff);
}

.rep-panel--empty {
    text-align: center;
}

.rep-panel__empty {
    margin: 0;
    color: var(--text-muted, #6b7280);
    font-size: 0.9rem;
}

.rep-panel__head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rep-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.rep-panel__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
}

.rep-panel__badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.rep-panel__tier {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rep-tier-color);
    background: color-mix(in srgb, var(--rep-tier-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--rep-tier-color) 35%, transparent);
}

.rep-panel__score {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-color, #1f2937);
}

.rep-panel__score small {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
}

.rep-panel__progress {
    margin-bottom: 1.1rem;
}

.rep-panel__bar {
    height: 8px;
    border-radius: 999px;
    background: var(--track-color, #eef0f3);
    overflow: hidden;
}

.rep-panel__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--rep-tier-color);
    transition: width 0.4s ease;
}

.rep-panel__bar--full .rep-panel__bar-fill {
    background: var(--rep-tier-color);
}

.rep-panel__hint {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
}

.rep-panel__hint--max {
    color: var(--rep-tier-color);
    font-weight: 600;
}

.rep-panel__components-title {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color, #374151);
}

.rep-panel__components {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.rep-panel__component-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.rep-panel__component-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color, #374151);
}

.rep-panel__component-val {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted, #6b7280);
}

.rep-panel__component-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--track-color, #eef0f3);
    overflow: hidden;
}

.rep-panel__component-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--rep-tier-color);
    transition: width 0.4s ease;
}

/* --- Tablet / desktop ------------------------------------------------------ */

@media (min-width: 768px) {
    .rep-panel {
        padding: 1.4rem;
    }

    .rep-panel__head {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .rep-panel__badge {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
    }
}

/* --- Badge del usuario (perfil propio, gamificado) ------------------------- */

.rep-badge {
    --rep-badge-color: #5b8def;
    margin: 1rem 0;
    padding: 1.1rem;
    border: 1px solid var(--border-color, #e3e6ea);
    border-radius: 14px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--rep-badge-color) 9%, var(--surface-color, #fff)),
        var(--surface-color, #fff));
}

.rep-badge__head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.rep-badge__icon {
    display: inline-flex;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--rep-badge-color);
    background: color-mix(in srgb, var(--rep-badge-color) 14%, transparent);
}

.rep-badge__icon svg {
    width: 100%;
    height: 100%;
}

.rep-badge__heading {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rep-badge__label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #6b7280);
}

.rep-badge__tier {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-color, #1f2937);
}

.rep-badge__score {
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rep-badge-color);
    white-space: nowrap;
}

.rep-badge__score small {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
}

.rep-badge__bar {
    height: 8px;
    border-radius: 999px;
    background: var(--track-color, #eef0f3);
    overflow: hidden;
}

.rep-badge__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--rep-badge-color);
    transition: width 0.4s ease;
}

.rep-badge__hint {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
}

.rep-badge__hint--max {
    color: var(--rep-badge-color);
    font-weight: 600;
}

.rep-badge__split {
    display: flex;
    gap: 0.6rem;
    margin: 0.9rem 0 0;
}

.rep-badge__split-item {
    flex: 1 1 0;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: var(--track-color, #f3f4f6);
}

.rep-badge__split-item dt {
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
}

.rep-badge__split-item dd {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-color, #1f2937);
}

.rep-badge__subtitle {
    margin: 0.8rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
}
