/**
 * EIASM Faculty Quote Block — all three template variants.
 *
 * Tokens locked against FacultyQuoteBlock.tsx.
 * Palette: teal #1587A8, teal-deep #0F6F8A, ink #0B1220,
 *          chip-bg #EAF4F8, border #E2E8ED.
 * Shared shadow: 0 4px 24px rgba(0,0,0,0.08).
 * Shared easing: cubic-bezier(0.22, 1, 0.36, 1) 450ms.
 *
 * !important strategy:
 *   - Typography: defended because themes often set font-family/size/color
 *     via body/article selectors that inherit down to our cards.
 *   - <blockquote>: fully reset — themes routinely add italic font-style,
 *     large default margins, and their own left borders. The card's left
 *     border is applied to .fqb-quote-block, not to raw blockquote.
 *   - <p>: margins zeroed because default UA styles and theme styles both
 *     inject 1em+ margins that break our spacing.
 *   - Images: dimensions/shape defended against WP and theme img resets.
 *   - Chips: defended (like v1 buttons) against global tag styling.
 */

/* ─── Shared card shell ────────────────────────────────────────── */

.fqb-card {
    max-width: 100%;
    margin-top: 32px;
    background: #FFFFFF;
    border: 1px solid #E2E8ED;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    cursor: default;
    box-sizing: border-box;
    transition:
        transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 450ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-card:focus { outline: none; }

.fqb-card:hover,
.fqb-card:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px -8px rgba(11, 18, 32, 0.12),
        0 4px 16px -4px rgba(21, 135, 168, 0.08);
    border-color: rgba(21, 135, 168, 0.45);
}

.fqb-card:focus-visible {
    outline: 2px solid #1587A8;
    outline-offset: 3px;
}

/* ─── Chip — defended like v1 buttons ──────────────────────────── */

.fqb-card .fqb-chip {
    display: inline-flex;
    align-items: center;
    background: #EAF4F8 !important;
    color: #1587A8 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 3px 10px !important;
    margin: 0;
    transition: background-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-card:hover .fqb-chip,
.fqb-card:focus-visible .fqb-chip {
    background-color: #DCEEF4 !important;
}

/* Chip wrapper — multi-chip support via flex wrap. */
.fqb-card .fqb-chip-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.fqb-spotlight .fqb-chip-wrap {
    justify-content: center;
}

/* ─── Identity text — defended against theme article typography ──── */

.fqb-card .fqb-name {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    color: #0B1220 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
}

.fqb-card .fqb-role {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    color: #6B7280 !important;
    margin: 2px 0 0 0 !important;
}

/* ─── Quote text — defended against p tag global margins/indent ──── */

.fqb-card .fqb-quote-text {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    letter-spacing: normal !important;
    color: rgba(11, 18, 32, 0.88) !important;
    font-style: normal !important;
    text-indent: 0 !important;
    transition: color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-card:hover .fqb-quote-text,
.fqb-card:focus-visible .fqb-quote-text {
    color: rgba(11, 18, 32, 1) !important;
}

/* ─── Avatar — defended against WP/theme img overrides ────────── */

.fqb-card .fqb-avatar,
.fqb-card img.fqb-avatar {
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
    height: auto;
    margin: 0;
    transition: box-shadow 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-card .fqb-avatar--placeholder {
    background: #EAF4F8;
}

.fqb-card:hover .fqb-avatar,
.fqb-card:focus-visible .fqb-avatar {
    box-shadow:
        0 0 0 2px #FFFFFF,
        0 0 0 4px rgba(21, 135, 168, 0.55);
}

/* ─── Variant: Default ─────────────────────────────────────────── */

.fqb-default {
    padding: 24px;
}

.fqb-default .fqb-chip-wrap {
    margin-bottom: 16px;
}

.fqb-default .fqb-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    min-width: 0;
}

.fqb-default .fqb-avatar,
.fqb-default img.fqb-avatar {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
}

.fqb-default .fqb-identity-text {
    min-width: 0;
    flex: 1;
}

/*
 * Blockquote reset — full defensive strip of theme styling.
 * Themes add italic font-style, large margins, left-borders, quotation
 * marks via ::before/::after, indented padding, background tints, etc.
 * Our visual language (teal left-border, 16px padding-left) is applied
 * on top of the reset.
 */
.fqb-default .fqb-quote-block {
    margin: 0 !important;
    padding: 0 0 0 16px !important;
    border: 0 !important;
    border-left: 4px solid #1587A8 !important;
    background: transparent !important;
    font-style: normal !important;
    quotes: none !important;
    transition:
        border-color 450ms cubic-bezier(0.22, 1, 0.36, 1),
        padding-left 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-default .fqb-quote-block::before,
.fqb-default .fqb-quote-block::after {
    content: none !important;
}

.fqb-default:hover .fqb-quote-block,
.fqb-default:focus-visible .fqb-quote-block {
    border-left-color: #0F6F8A !important;
    padding-left: 18px !important;
}

/* ─── Variant: Editorial ───────────────────────────────────────── */

.fqb-editorial {
    overflow: hidden;
    display: grid;
    grid-template-columns: 4px 140px 1fr;
    min-width: 0;
}

.fqb-editorial .fqb-rail {
    background: #1587A8;
    transition: background-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-editorial:hover .fqb-rail,
.fqb-editorial:focus-visible .fqb-rail {
    background-color: #0F6F8A;
}

.fqb-editorial .fqb-avatar-pane {
    background: #EAF4F8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fqb-editorial .fqb-avatar-pane .fqb-avatar,
.fqb-editorial .fqb-avatar-pane img.fqb-avatar {
    width: 92px !important;
    height: 92px !important;
    border: 3px solid #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.fqb-editorial .fqb-content-pane {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.fqb-editorial .fqb-content-pane .fqb-chip {
    align-self: flex-start;
}

.fqb-editorial .fqb-name {
    font-weight: 800 !important;
    font-size: 17px !important;
    letter-spacing: -0.01em !important;
}

.fqb-editorial .fqb-quote-text {
    font-size: 14.5px !important;
}

@media (max-width: 520px) {
    /* Stack vertically on mobile — portrait stays visible above content. */
    .fqb-editorial {
        grid-template-columns: 1fr;
    }
    .fqb-editorial .fqb-rail {
        display: none;
    }
    .fqb-editorial .fqb-avatar-pane {
        padding: 20px;
    }
    .fqb-editorial .fqb-avatar-pane .fqb-avatar,
    .fqb-editorial .fqb-avatar-pane img.fqb-avatar {
        width: 72px !important;
        height: 72px !important;
    }
    .fqb-editorial .fqb-content-pane {
        padding: 20px;
        text-align: center;
        align-items: center;
    }
}

/* ─── Variant: Spotlight ───────────────────────────────────────── */

.fqb-spotlight {
    position: relative;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fqb-spotlight .fqb-chip-wrap {
    margin-bottom: 18px;
}

.fqb-spotlight .fqb-avatar,
.fqb-spotlight img.fqb-avatar {
    width: 96px !important;
    height: 96px !important;
    box-shadow:
        0 0 0 4px #FFFFFF,
        0 0 0 5px #E2E8ED;
}

.fqb-spotlight .fqb-identity-text {
    margin-top: 14px;
    margin-bottom: 4px;
}

.fqb-spotlight .fqb-name {
    font-weight: 800 !important;
    font-size: 18px !important;
    letter-spacing: -0.01em !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.fqb-spotlight .fqb-divider {
    display: block;
    width: 32px;
    height: 2px;
    background: #1587A8;
    border-radius: 2px;
    margin: 16px 0 14px;
    transition:
        width 450ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-spotlight:hover .fqb-divider,
.fqb-spotlight:focus-visible .fqb-divider {
    width: 56px;
    background: #0F6F8A;
}

.fqb-spotlight .fqb-quote-text {
    max-width: 560px;
    line-height: 1.75 !important;
}

.fqb-bracket {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: #1587A8;
    border-style: solid;
    border-width: 0;
    transition: border-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fqb-bracket-tl { top: 12px; left: 12px;  border-top-width: 2px; border-left-width: 2px;  border-top-left-radius: 4px; }
.fqb-bracket-tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 4px; }
.fqb-bracket-bl { bottom: 12px; left: 12px;  border-bottom-width: 2px; border-left-width: 2px;  border-bottom-left-radius: 4px; }
.fqb-bracket-br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 4px; }

.fqb-spotlight:hover .fqb-bracket,
.fqb-spotlight:focus-visible .fqb-bracket {
    border-color: #0F6F8A;
}

/* ─── Reduced motion ───────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .fqb-card,
    .fqb-avatar,
    .fqb-chip,
    .fqb-quote-block,
    .fqb-quote-text,
    .fqb-rail,
    .fqb-bracket,
    .fqb-divider {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .fqb-card:hover,
    .fqb-card:focus-visible {
        transform: none;
    }
}
