/**
 * Indicadores de Qualidade — complementos do casco público.
 */

.sw-iq {
    padding-bottom: 36px;
}

.sw-iq-intro {
    margin-bottom: 22px;
}

.sw-iq-intro .sw-school-prose {
    text-align: justify;
    hyphens: auto;
}

.sw-iq-intro .sw-school-prose p {
    margin: 0 0 14px;
}

.sw-iq-intro .sw-school-prose p:last-child {
    margin-bottom: 0;
}

.sw-iq .sw-school-card--wide {
    width: 100%;
}

/* header modal (compartilha padrão COM/CONMEA) */
body.sw-public .modal .sw-iq-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    min-height: 0;
}

body.sw-public .modal .sw-iq-modal-header .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

body.sw-public .modal .sw-iq-modal-header .modal-title > i {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
    color: var(--brand-600, #0f9cb3);
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 12%, transparent);
    border-radius: 8px;
    padding: 0;
    box-sizing: border-box;
}

body.sw-public .modal .sw-iq-modal-header .close {
    position: static;
    float: none;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    opacity: .75;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sm-text, #1c2b30);
    text-shadow: none;
    background: transparent;
}

body.sw-public .modal .sw-iq-modal-header .close:hover,
body.sw-public .modal .sw-iq-modal-header .close:focus {
    opacity: 1;
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 10%, transparent);
    outline: none;
}

html[data-theme="dark"] body.sw-public .modal .sw-iq-modal-header .modal-title > i {
    color: #9ef0fb;
    background: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] body.sw-public .modal .sw-iq-modal-header .close {
    color: #e6f2f4;
}

/* áreas / botões do modal cadernos */
.sw-iq-doc-areas {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sw-iq-doc-area {
    border-radius: 12px;
    border: 1px solid var(--sm-border, #dbe7ea);
    background: var(--sm-surface-2, #f4fafb);
    padding: 16px;
    min-width: 0;
}

.sw-iq-doc-area-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--sm-border, #dbe7ea);
}

.sw-iq-doc-area-head > i {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--brand-600, #0f9cb3);
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 12%, transparent);
    border-radius: 8px;
}

.sw-iq-doc-area-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-900, #063e48);
}

.sw-iq-doc-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sw-iq-doc-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--brand-600, #0f9cb3) 22%, var(--sm-border, #dbe7ea));
    background: var(--sm-surface, #fff);
    color: var(--brand-800, #085f6d) !important;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none !important;
    text-align: left;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.sw-iq-doc-btn > i:first-child {
    flex-shrink: 0;
    color: var(--brand-600, #0f9cb3);
    width: 1.2em;
    text-align: center;
}

.sw-iq-doc-btn > span {
    flex: 1;
    min-width: 0;
}

.sw-iq-doc-btn-ext {
    flex-shrink: 0;
    font-size: .85em;
    opacity: .55;
}

.sw-iq-doc-btn:hover,
.sw-iq-doc-btn:focus {
    background: color-mix(in srgb, var(--brand-600, #0f9cb3) 10%, #fff);
    border-color: var(--brand-600, #0f9cb3);
    color: var(--brand-900, #063e48) !important;
    box-shadow: 0 4px 14px rgba(6, 62, 72, .08);
    outline: none;
}

html[data-theme="dark"] .sw-iq-doc-area {
    background: rgba(12, 42, 50, .72);
    border-color: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-iq-doc-area-head {
    border-bottom-color: rgba(64, 200, 219, .12);
}

html[data-theme="dark"] .sw-iq-doc-area-head > i {
    color: #9ef0fb;
    background: rgba(64, 200, 219, .14);
}

html[data-theme="dark"] .sw-iq-doc-area-title {
    color: #e6f2f4;
}

html[data-theme="dark"] .sw-iq-doc-btn {
    background: rgba(8, 32, 38, .9);
    border-color: rgba(64, 200, 219, .18);
    color: #c7eef5 !important;
}

html[data-theme="dark"] .sw-iq-doc-btn:hover,
html[data-theme="dark"] .sw-iq-doc-btn:focus {
    background: rgba(64, 200, 219, .12);
    border-color: rgba(64, 200, 219, .4);
    color: #e6f2f4 !important;
}

/* BI embed */
.sw-iq-bi {
    margin: 0 0 24px;
}

.sw-iq-bi-frame {
    display: block;
    width: 100%;
    min-height: min(78vh, 720px);
    height: 72vh;
    border: 1px solid var(--sm-border, #dbe7ea);
    border-radius: 12px;
    background: #0a2a32;
}

html[data-theme="dark"] .sw-iq-bi-frame {
    border-color: rgba(64, 200, 219, .14);
}

@media (max-width: 575.98px) {
    .sw-iq-intro .sw-school-prose {
        text-align: left;
        font-size: 14px;
    }
}
