/**
 * Brand Voice Settings — v20260801a
 *
 * Self-contained styles for the "How you sound" card in Settings ▸ Branding.
 * Every control this card renders is styled here rather than assuming the host
 * page's stylesheet, so the module can't ship browser-default controls.
 */

/* ── Provenance banner ──────────────────────────────────────────────────── */
.brand-voice-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.brand-voice-banner strong { font-weight: 600; }
.brand-voice-banner em { font-style: normal; font-weight: 600; }

.brand-voice-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
}

.brand-voice-banner--review {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
}

.brand-voice-banner--confirmed {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}

.brand-voice-banner--empty {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #475569;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.brand-voice-group { margin-bottom: 20px; }
.brand-voice-group:last-child { margin-bottom: 0; }

.brand-voice-group > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.brand-voice-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
    line-height: 1.45;
    margin-bottom: 8px;
}

/* Own the control styling — never inherit browser defaults. */
.brand-voice-group textarea,
.brand-voice-group input[type="text"],
.brand-voice-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #D1D5DB;
    border-radius: 7px;
    font-family: inherit;
    /* 16px keeps iOS from zooming the viewport on focus. */
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

@media (min-width: 640px) {
    .brand-voice-group textarea,
    .brand-voice-group input[type="text"],
    .brand-voice-group select { font-size: 14px; }
}

.brand-voice-group textarea {
    resize: vertical;
    min-height: 72px;
}

.brand-voice-group textarea:focus,
.brand-voice-group input[type="text"]:focus,
.brand-voice-group select:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}

.brand-voice-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

/* Two-up on wide screens; the short enum fields don't deserve full width. */
.brand-voice-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .brand-voice-row { grid-template-columns: 1fr 1fr; }
}

.brand-voice-row .brand-voice-group { margin-bottom: 0; }

/* ── Footer status ──────────────────────────────────────────────────────── */
.brand-voice-status {
    margin-left: 10px;
    font-size: 13px;
    color: #6B7280;
}

.brand-voice-status--ok { color: #059669; }
.brand-voice-status--error { color: #DC2626; }

/* Secondary action sits away from Save so a re-scan isn't a mis-click. */
.brand-voice-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.brand-voice-footer-actions .brand-voice-spacer { flex: 1 1 auto; }

@media (max-width: 520px) {
    .brand-voice-footer-actions { flex-direction: column; align-items: stretch; }
    .brand-voice-footer-actions .brand-voice-spacer { display: none; }
    .brand-voice-status { margin-left: 0; text-align: center; }
}
