/**
 * EIASM Graduate Stories — Inline Programme Strip.
 *
 * Tokens locked against InlineProgrammeStrip.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.
 *
 * Fits inside 7/12 column without overflow.
 *
 * !important usage mirrors the v1 pattern: applied to properties that
 * commonly clash with Elementor global styles and theme resets — typography,
 * image sizing/shape, and paragraph margins. Card/container geometry is
 * protected by selector specificity alone.
 */

/* ─── Container + responsive grid ─────────────────────────────── */

.eiasm-inline-strip {
    max-width: 100%;
    margin-top: 32px;
    margin-bottom: 0;
    box-sizing: border-box;
}

.eiasm-inline-strip .ips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}

@media (min-width: 640px) {
    .eiasm-inline-strip .ips-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* ─── Shared card base ────────────────────────────────────────── */

.eiasm-inline-strip .ips-card {
    background: #FFFFFF;
    border: 1px solid #E2E8ED;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    min-width: 0;
    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);
}

.eiasm-inline-strip .ips-card:focus { outline: none; }

.eiasm-inline-strip .ips-card:hover,
.eiasm-inline-strip .ips-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);
}

.eiasm-inline-strip .ips-card:focus-visible {
    outline: 2px solid #1587A8;
    outline-offset: 3px;
}

/* ─── Avatar base — !important on sizing (Elementor/WP img overrides) ─── */

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

.eiasm-inline-strip .ips-avatar--placeholder {
    background: #EAF4F8;
}

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

/* ─── Typography — !important against theme body/article resets ──── */

.eiasm-inline-strip .ips-name {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    color: #0B1220 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
}

.eiasm-inline-strip .ips-role {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    color: #6B7280 !important;
    /* Option B — natural wrap. Role/company commonly exceed one line
       (especially Czech/Turkish titles). Let them flow instead of truncate. */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin: 0 !important;
}

.eiasm-inline-strip .ips-quote {
    margin: 10px 0 0 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
    color: rgba(11, 18, 32, 0.85) !important;
    font-style: normal !important;
    text-indent: 0 !important;
    transition: color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.eiasm-inline-strip .ips-card:hover .ips-quote,
.eiasm-inline-strip .ips-card:focus-visible .ips-quote {
    color: rgba(11, 18, 32, 1) !important;
}

/* ─── Chips ───────────────────────────────────────────────────── */

.eiasm-inline-strip .ips-chip {
    display: inline-block;
    background: #EAF4F8 !important;
    color: #1587A8 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    border-radius: 20px !important;
    padding: 3px 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: background-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.eiasm-inline-strip .ips-card:hover .ips-chip,
.eiasm-inline-strip .ips-card:focus-visible .ips-chip {
    background-color: #DCEEF4 !important;
}

.eiasm-inline-strip .ips-chip-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
    min-width: 0;
}

.eiasm-inline-strip .ips-chip-row--bottom {
    margin-top: auto;
    padding-top: 10px;
}

.eiasm-inline-strip .ips-chip-row--centered {
    margin-top: auto;
    padding-top: 12px;
    justify-content: center;
}

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

.eiasm-inline-strip .ips-default-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.eiasm-inline-strip .ips-default-card .ips-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.eiasm-inline-strip .ips-default-card .ips-avatar,
.eiasm-inline-strip .ips-default-card img.ips-avatar {
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0;
}

.eiasm-inline-strip .ips-default-card .ips-identity {
    min-width: 0;
    flex: 1;
}

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

.eiasm-inline-strip .ips-editorial-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 3px 84px 1fr;
    min-width: 0;
}

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

.eiasm-inline-strip .ips-editorial-card:hover .ips-rail,
.eiasm-inline-strip .ips-editorial-card:focus-visible .ips-rail {
    background-color: #0F6F8A;
}

.eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane {
    background: #EAF4F8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane .ips-avatar,
.eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane img.ips-avatar {
    width: 60px !important;
    height: 60px !important;
    border: 2px solid #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.eiasm-inline-strip .ips-editorial-card .ips-editorial-content-pane {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.eiasm-inline-strip .ips-editorial-card .ips-name {
    font-weight: 700 !important;
    letter-spacing: -0.005em !important;
}

.eiasm-inline-strip .ips-editorial-card .ips-quote {
    margin-top: 0 !important;
    font-size: 13.5px !important;
}

@media (max-width: 380px) {
    /* Stack vertically on very narrow viewports — portrait stays visible. */
    .eiasm-inline-strip .ips-editorial-card {
        grid-template-columns: 1fr;
    }
    .eiasm-inline-strip .ips-editorial-card .ips-rail {
        display: none;
    }
    .eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane {
        padding: 10px;
    }
    .eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane .ips-avatar,
    .eiasm-inline-strip .ips-editorial-card .ips-editorial-avatar-pane img.ips-avatar {
        width: 52px !important;
        height: 52px !important;
    }
}

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

.eiasm-inline-strip .ips-spotlight-card {
    position: relative;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.eiasm-inline-strip .ips-spotlight-card .ips-avatar,
.eiasm-inline-strip .ips-spotlight-card img.ips-avatar {
    width: 56px !important;
    height: 56px !important;
    box-shadow:
        0 0 0 3px #FFFFFF,
        0 0 0 4px #E2E8ED;
}

.eiasm-inline-strip .ips-spotlight-card .ips-identity {
    margin-top: 10px;
    max-width: 100%;
}

.eiasm-inline-strip .ips-spotlight-card .ips-name {
    font-weight: 700 !important;
    letter-spacing: -0.005em !important;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.eiasm-inline-strip .ips-spotlight-card .ips-role {
    margin-top: 2px !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.eiasm-inline-strip .ips-spotlight-card .ips-divider {
    display: block;
    width: 24px;
    height: 2px;
    background: #1587A8;
    border-radius: 2px;
    margin: 12px 0 10px;
    transition:
        width 450ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.eiasm-inline-strip .ips-spotlight-card:hover .ips-divider,
.eiasm-inline-strip .ips-spotlight-card:focus-visible .ips-divider {
    width: 44px;
    background: #0F6F8A;
}

.eiasm-inline-strip .ips-spotlight-card .ips-quote {
    margin-top: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.65 !important;
}

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

.eiasm-inline-strip .ips-bracket-tl { top: 10px; left: 10px;  border-top-width: 2px; border-left-width: 2px;  border-top-left-radius: 4px; }
.eiasm-inline-strip .ips-bracket-tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 4px; }
.eiasm-inline-strip .ips-bracket-bl { bottom: 10px; left: 10px;  border-bottom-width: 2px; border-left-width: 2px;  border-bottom-left-radius: 4px; }
.eiasm-inline-strip .ips-bracket-br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 4px; }

.eiasm-inline-strip .ips-spotlight-card:hover .ips-bracket,
.eiasm-inline-strip .ips-spotlight-card:focus-visible .ips-bracket {
    border-color: #0F6F8A;
}

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

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