/* ================================================================
   InfoPanel Plugin – Frontend Styles  v2.8.1
   ================================================================ */

:root {
    /* ── Tokens aligned with Unified Statistics Dashboard ── */
    /* Shared site values (theme-style.css --nso-*); hex = fallback only. */
    --ip-primary:      var(--nso-teal, #26a69a);
    --ip-primary-dark: var(--nso-teal-dark, #00897b);
    --ip-accent:       #5c6bc0;   /* --usd-accent        */
    --ip-link-blue:    var(--nso-link, #1a56a0);
    --ip-text-dark:    #352a2a;   /* --usd-text-dark     */
    --ip-text-mid:     #4a5568;   /* --usd-text-mid      */
    --ip-text-light:   var(--nso-text-muted, #718096);
    --ip-border:       var(--nso-border, #e0e0e0);
    --ip-bg-soft:      #f7f8fa;   /* --usd-bg            */
    --ip-radius:       var(--nso-radius, 10px);
    --ip-shadow:       var(--nso-shadow, 0 2px 8px rgba(0,0,0,0.07));
    --ip-shadow-hover: 0 8px 24px rgba(38,166,154,0.14);
    --ip-transition:   0.22s ease;
    /* Urgency colors */
    --ip-urgency-high:   #e74c3c;
    --ip-urgency-medium: #f39c12;
    --ip-urgency-low:    #2ecc71;
    --ip-coming-soon:    var(--nso-teal, #26a69a);
    /* Width of the visible page, excluding the scrollbar. infopanel.js keeps
       this up to date; 100vw is only the fallback before the script runs.
       Using 100vw directly includes the scrollbar and causes a small
       horizontal scrollbar on desktop. */
    --ip-vw: 100vw;
}

/* ================================================================
   FULL-WIDTH ARCHIVE PAGES
   ================================================================ */

body.infopanel-fullwidth-page,
body.infopanel-fullwidth-page #page,
body.infopanel-fullwidth-page #content,
body.infopanel-fullwidth-page #primary,
body.infopanel-fullwidth-page #main,
body.infopanel-fullwidth-page .site,
body.infopanel-fullwidth-page .site-content,
body.infopanel-fullwidth-page .content-area,
body.infopanel-fullwidth-page .entry-content,
body.infopanel-fullwidth-page article,
body.infopanel-fullwidth-page .post,
body.infopanel-fullwidth-page .page,
body.infopanel-fullwidth-page .container,
body.infopanel-fullwidth-page .container-fluid,
body.infopanel-fullwidth-page .wp-block-group,
body.infopanel-fullwidth-page .alignfull {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

body.infopanel-fullwidth-page #secondary,
body.infopanel-fullwidth-page .widget-area,
body.infopanel-fullwidth-page aside.sidebar,
body.infopanel-fullwidth-page .sidebar {
    display: none !important;
}

body.infopanel-fullwidth-page .ip-archive-page {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin-left:  calc( 50% - var(--ip-vw) / 2 ) !important;
    margin-right: calc( 50% - var(--ip-vw) / 2 ) !important;
    width: var(--ip-vw) !important;
    max-width: var(--ip-vw) !important;
}

/* ================================================================
   MAIN INFOPANEL WIDGET (DASHBOARD)
   ================================================================ */

/* ================================================================
   REMOVE ALL TOP SPACING ABOVE THE INFOPANEL WIDGET
   ================================================================ */

/* 1. WordPress wraps shortcodes in <p> — kill its margin/padding */
p:has(> .wp-infopanel-block),
p > .wp-infopanel-block {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.entry-content > p:has(> .wp-infopanel-block),
.entry-content > p:empty {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* 2. Kill top padding on the entry-content wrapper when it
      contains the infopanel widget as first meaningful child */
.entry-content:has(> .wp-infopanel-block),
.entry-content:has(> p > .wp-infopanel-block) {
    padding-top: 0 !important;
    margin-top:  0 !important;
}

/* 3. Page/post content area top padding */
.page .entry-content,
.post .entry-content {
    padding-top: 0 !important;
}

/* 4. Any blank paragraphs / empty nodes WP inserts before the widget */
.entry-content > br:first-child,
.entry-content > p:first-child:empty {
    display: none !important;
}

/* 5. Theme entry-header / page-header bottom margin that pushes
      the content area down — only suppress on pages that have the widget */
body:has(.wp-infopanel-block) .entry-header,
body:has(.wp-infopanel-block) .page-header,
body:has(.wp-infopanel-block) .entry-title {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 6. Inner content section top padding */
body:has(.wp-infopanel-block) #content.site-content,
body:has(.wp-infopanel-block) .content-area {
    padding-top: 0 !important;
    margin-top:  0 !important;
}

.wp-infopanel-block {
    position: relative !important;
    /* Full-width breakout (scrollbar-safe, see --ip-vw) */
    left: auto !important;
    right: auto !important;
    margin-left:  calc( 50% - var(--ip-vw) / 2 ) !important;
    margin-right: calc( 50% - var(--ip-vw) / 2 ) !important;
    width: var(--ip-vw) !important;
    max-width: var(--ip-vw) !important;
    /* Reset top spacing completely */
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #fff;
    padding-bottom: 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
    font-family: var(--nso-font, 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif);
    color: var(--ip-text-dark);
}

.infopanel-container {
    max-width: 100%;
    margin: 0;
    padding: 0 48px;
    width: 100%;
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-wrap: nowrap;   /* prevent columns from wrapping — keeps them side-by-side */
    box-sizing: border-box;
}

.infopanel-col   { display: flex; flex-direction: column; flex: 1; }
.infopanel-left  { flex: 3; display: flex; flex-direction: column; align-self: stretch; }
/* Left tile must also stretch to fill column height for equal panels */
.infopanel-left > .infopanel-tile { flex: 1; }

/* Right column — wider events panel (flex:2 vs left flex:3 = ~40% width).
   align-self:stretch makes it match the left column's height. */
.infopanel-right {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

/* When no featured event exists the right column is not rendered;
   the left column expands to fill the full container width. */
.infopanel-no-sidebar .infopanel-left { flex: 1; align-self: stretch; }

.infopanel-tile {
    flex-grow: 1;
    background: #fff;
    border-radius: var(--ip-radius);
    box-shadow: var(--ip-shadow);
    padding: 24px 24px 20px;
    border: 1px solid var(--ip-border);
    transition: var(--ip-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.infopanel-tile:hover { box-shadow: var(--ip-shadow-hover); }

/* ── TABS ─────────────────────────────────────────────────────── */
.infopanel-tab-menu {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--ip-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.infopanel-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--ip-text-mid);
    cursor: pointer;
    transition: var(--ip-transition);
    margin-bottom: -1px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.infopanel-tab-btn:hover { color: var(--ip-primary); background: rgba(38,166,154,0.05); }
.infopanel-tab-btn.active {
    color: var(--ip-primary-dark);
    background: #fff;
    border: 1px solid var(--ip-border);
    border-bottom: 1px solid #fff;
    font-weight: 700;
    z-index: 2;
}
.infopanel-tab-content { display: none; animation: ipFadeSlide 0.25s ease; flex: 1; overflow: visible; }
.infopanel-tab-content.active { display: flex; flex-direction: column; }
@keyframes ipFadeSlide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── TIMELINE ─────────────────────────────────────────────────── */
.infopanel-timeline {
    position: relative;
    padding-left: 28px;
    margin: 8px 0 4px;
    flex: 1;
}
.infopanel-timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--ip-border);
    border-radius: 4px;
}
.infopanel-timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 4px 10px 4px 6px;
    border-radius: 10px;
    transition: var(--ip-transition);
    background: transparent !important;
}
.infopanel-timeline-item:last-child { margin-bottom: 0; }
.infopanel-timeline-item:hover { background: rgba(38,166,154,0.04) !important; transform: translateX(4px); }

/* Dots - no background coloring on cards */
.infopanel-dot {
    position: absolute;
    left: -22px; top: 10px;
    width: 10px;
    height: 10px;
    background: var(--ip-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--ip-primary);
    transition: var(--ip-transition);
}
.infopanel-timeline-item:hover .infopanel-dot {
    background: var(--ip-primary-dark);
    box-shadow: 0 0 0 2px var(--ip-primary-dark);
    transform: scale(1.2);
}

/* Urgency dots - ONLY dots have color */
.ip-urgency-high {
    background: var(--ip-urgency-high) !important;
    box-shadow: 0 0 0 2px var(--ip-urgency-high), 0 0 12px rgba(231, 76, 60, 0.3) !important;
    animation: ipDotPulseHigh 2s ease-in-out infinite;
}
.ip-urgency-medium {
    background: var(--ip-urgency-medium) !important;
    box-shadow: 0 0 0 2px var(--ip-urgency-medium), 0 0 12px rgba(243, 156, 18, 0.3) !important;
}
.ip-urgency-low {
    background: var(--ip-urgency-low) !important;
    box-shadow: 0 0 0 2px var(--ip-urgency-low), 0 0 12px rgba(46, 204, 113, 0.3) !important;
}

/* Coming Soon - Special dot for the nearest release (primary color with glow) */
.ip-coming-soon {
    background: var(--ip-coming-soon) !important;
    box-shadow: 0 0 0 3px var(--ip-coming-soon), 0 0 20px rgba(38, 166, 154, 0.5) !important;
    animation: ipDotComingSoon 1.5s ease-in-out infinite;
    width: 14px !important;
    height: 14px !important;
    left: -24px !important;
    top: 8px !important;
}

@keyframes ipDotComingSoon {
    0%, 100% { 
        box-shadow: 0 0 0 3px var(--ip-coming-soon), 0 0 20px rgba(38, 166, 154, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 5px var(--ip-coming-soon), 0 0 35px rgba(38, 166, 154, 0.7);
        transform: scale(1.15);
    }
}

@keyframes ipDotPulseHigh {
    0%, 100% { box-shadow: 0 0 0 2px var(--ip-urgency-high), 0 0 12px rgba(231, 76, 60, 0.3); }
    50%       { box-shadow: 0 0 0 4px var(--ip-urgency-high), 0 0 20px rgba(231, 76, 60, 0.5); }
}

/* Delayed dot */
.infopanel-dot--delayed {
    background: #e74c3c !important;
    box-shadow: 0 0 0 2px #e74c3c, 0 0 16px rgba(231, 76, 60, 0.5) !important;
    animation: ipDotPulseDelayed 1.5s ease-in-out infinite;
}
@keyframes ipDotPulseDelayed {
    0%, 100% { box-shadow: 0 0 0 2px #e74c3c, 0 0 16px rgba(231, 76, 60, 0.5); }
    50%       { box-shadow: 0 0 0 5px #e74c3c, 0 0 28px rgba(231, 76, 60, 0.7); }
}

/* Badges */
.infopanel-latest-badge {
    display: inline-block;
    background: var(--ip-coming-soon);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 4px;
}
.infopanel-latest-badge i { font-size: 0.5rem; margin-right: 2px; }

.infopanel-latest-badge--delayed {
    background: #e74c3c;
}
/* Came out earlier today (after its release time) */
.infopanel-latest-badge--released {
    background: #27ae60;
}

.infopanel-date {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ip-text-light);
    margin-bottom: 3px;
}
.infopanel-countdown {
    font-weight: 400;
    color: var(--ip-primary);
}
.infopanel-delay-reason {
    font-weight: 400;
    color: #e74c3c;
    font-size: 0.65rem;
    display: block;
    margin-top: 2px;
}
.infopanel-delay-reason i {
    margin-right: 4px;
}

.infopanel-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ip-text-dark);
    line-height: 1.3;
}
.infopanel-title a {
    color: var(--ip-link-blue);
    text-decoration: none;
}
.infopanel-title a:hover {
    color: var(--ip-primary);
    text-decoration: underline;
}

.infopanel-findings-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 3px;
}
.ip-finding-preview {
    font-size: 0.7rem;
    color: var(--ip-text-light);
    background: var(--ip-bg-soft);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--ip-border);
}

.infopanel-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ip-link-blue);
    text-decoration: none;
    margin-top: 2px;
    transition: var(--ip-transition);
}
.infopanel-detail-link i { font-size: 0.65rem; transition: transform var(--ip-transition); }
.infopanel-detail-link:hover { color: var(--ip-primary); }
.infopanel-detail-link:hover i { transform: translateX(3px); }

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.infopanel-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ip-text-light);
}
.infopanel-empty i {
    font-size: 2rem;
    color: var(--ip-border);
    margin-bottom: 12px;
    display: block;
}
.infopanel-empty p { margin: 0; font-size: 0.95rem; }
.infopanel-empty-sub { font-size: 0.8rem; opacity: 0.7; }

/* ── SECTION TITLE — mirrors dashboard .section-title ─────────── */
.infopanel-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ip-text-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ip-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.infopanel-section-title i {
    color: var(--ip-primary);
    font-size: 0.9rem;
}

/* ── MISSION & VISION ─────────────────────────────────────────── */
.infopanel-mv-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 16px; }
@media (max-width: 860px) { .infopanel-mv-grid { grid-template-columns: 1fr; } }
.infopanel-mv-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid var(--ip-border);
    transition: var(--ip-transition);
}
.infopanel-mv-card:hover { border-color: var(--ip-primary); box-shadow: 0 6px 16px rgba(38,166,154,0.08); transform: translateY(-2px); }
.infopanel-mv-card i    { font-size: 1.5rem; color: var(--ip-primary); margin-bottom: 10px; display: inline-block; }
.infopanel-mv-card h3   { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--ip-link-blue); }
.infopanel-mv-card p    { font-size: 0.85rem; line-height: 1.5; color: var(--ip-text-mid); }
.infopanel-motto {
    border-left: 4px solid var(--ip-primary);
    padding: 12px 16px;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--ip-text-mid);
}
.infopanel-motto i { font-size: 0.85rem; margin-right: 8px; color: var(--ip-primary); }

/* ================================================================
   EVENTS PANEL  (right column)
   Layout: image banner on top, teal info panel below.
   Uses background-image so no absolute-positioning height chain
   is needed — the banner div has a plain fixed height.
   ================================================================ */

.infopanel-events-tile {
    padding: 0 !important;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    border-radius: var(--ip-radius);
}

.ip-event-inner {
    display: flex;
    flex-direction: column;   /* image ON TOP, info panel BELOW */
    flex: 1;
    overflow: hidden;
    border-radius: var(--ip-radius);
}

/* ── IMAGE BANNER (top) ───────────────────────────────────────── */
.ip-event-banner {
    width: 100%;
    height: 160px;            /* fixed height — always visible */
    flex-shrink: 0;
    background-color: var(--nso-teal-dark, #00897b);
    background-image: linear-gradient(135deg, var(--nso-teal, #26a69a) 0%, var(--nso-teal-dark, #00897b) 100%);
    background-size: cover;
    background-position: center center;
    border-radius: var(--ip-radius) var(--ip-radius) 0 0;
    position: relative;
    overflow: hidden;
}

/* dim overlay so text placed over image stays readable */
.ip-event-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.30) 100%);
    pointer-events: none;
}

/* Hide the <img> tag — we use background-image instead */
.ip-event-banner__img    { display: none; }
.ip-event-banner__overlay { display: none; }

/* Placeholder icon when no image is set */
.ip-event-banner__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.ip-event-banner__placeholder i {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.40);
}

/* ── INFO PANEL (bottom) ──────────────────────────────────────── */
.ip-event-body {
    flex: 1;
    padding: 16px 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    background: var(--ip-primary);
    border-radius: 0 0 var(--ip-radius) var(--ip-radius);
    color: #fff;
    overflow: hidden;
}

.ip-event-banner__tag {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.ip-event-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.93);
    margin: 0;
    line-height: 1.4;
}

.ip-event-description {
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.78);
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ip-event-discover-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.75);
    border-radius: 4px;
    color: #fff;
    font-size: 0.79rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: var(--ip-transition);
    white-space: nowrap;
}
.ip-event-discover-btn i { font-size: 0.68rem; transition: transform var(--ip-transition); }
.ip-event-discover-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.ip-event-discover-btn:hover i { transform: translateX(4px); }

.ip-event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.25);
    padding-top: 8px;
}
.ip-event-meta__item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.71rem;
    color: rgba(255,255,255,0.78);
    font-weight: 500;
    line-height: 1.4;
}
.ip-event-meta__item i {
    color: rgba(255,255,255,0.55);
    font-size: 0.69rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ================================================================
   QUICK LINKS STRIP  (full-width row between panels and feedback)
   ================================================================ */
.infopanel-ql-strip {
    width: 100%;
    background: var(--ip-bg-soft);
    border-top: 1px solid var(--ip-border);
    border-bottom: 1px solid var(--ip-border);
    padding: 14px 0;
    margin-top: 0;
}
.infopanel-ql-strip__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 48px;
    flex-wrap: wrap;
}
.infopanel-ql-strip__heading {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ip-text-light);
    white-space: nowrap;
    flex-shrink: 0;
}
.infopanel-ql-strip__heading i { color: var(--ip-primary); font-size: 0.8rem; }

.infopanel-ql-strip__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.infopanel-ql-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--ip-border);
    background: #fff;
    color: var(--ip-link-blue);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--ip-transition);
    cursor: pointer;
}
.infopanel-ql-strip__item i {
    color: var(--ip-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--ip-transition);
}
.infopanel-ql-strip__item:hover {
    border-color: var(--ip-primary);
    background: rgba(38,166,154,0.06);
    color: var(--ip-primary-dark);
    box-shadow: 0 4px 12px rgba(38,166,154,0.1);
    transform: translateY(-1px);
}
.infopanel-ql-strip__item:hover i { color: var(--ip-accent); }

/* Keep legacy sidebar ql styles for any direct usage elsewhere */
.infopanel-quicklinks { display: flex; flex-direction: column; gap: 10px; }
.infopanel-ql-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    padding: 12px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ip-link-blue);
    border: 1px solid var(--ip-border);
    transition: var(--ip-transition);
}
.infopanel-ql-item a i { font-size: 1.1rem; width: 28px; text-align: center; color: var(--ip-primary); transition: var(--ip-transition); }
.infopanel-ql-item a:hover {
    transform: translateX(4px);
    border-color: var(--ip-primary);
    box-shadow: 0 8px 20px rgba(38,166,154,0.1);
    color: var(--ip-primary-dark);
}
.infopanel-ql-item a:hover i { color: var(--ip-accent); }

/* ── SEE ALL LINK ─────────────────────────────────────────────── */
.infopanel-see-all-wrap {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--ip-border);
    text-align: right;
}
.infopanel-see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ip-link-blue);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 40px;
    border: 1.5px solid var(--ip-primary);
    background: rgba(38,166,154,0.04);
    transition: var(--ip-transition);
    letter-spacing: 0.01em;
}
.infopanel-see-all-link i:first-child { font-size: 0.8rem; }
.infopanel-see-all-link i:last-child  { font-size: 0.7rem; transition: transform var(--ip-transition); }
.infopanel-see-all-link:hover {
    background: var(--ip-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(38,166,154,0.22);
}
.infopanel-see-all-link:hover i:last-child { transform: translateX(3px); }

/* ================================================================
   ARCHIVE PAGE
   ================================================================ */

.ip-archive-page {
    box-sizing: border-box;
    overflow-x: hidden;
    font-family: 'Inter','Segoe UI',system-ui,-apple-system,'Roboto',sans-serif;
    color: var(--ip-text-dark);
    background: var(--ip-bg-soft);
    padding-bottom: 60px;
    width: 100%;
}

/* ── HERO HEADER ──────────────────────────────────────────────── */
.ip-archive-hero {
    background: linear-gradient(135deg, var(--ip-primary) 0%, var(--ip-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
/* Same layout as the Job Opportunities / Bids & Tenders / Departments
   headers: icon box on the left, small label + title + intro on the right. */
.ip-archive-hero__inner {
    max-width: 100%;
    margin: 0;
    padding: 44px 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.ip-archive-hero__icon {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ip-archive-hero__icon i  { font-size: 30px; color: #fff; }
.ip-archive-hero__text    { flex: 1; min-width: 0; }
.ip-archive-hero__text .ip-archive-hero__eyebrow {
    margin: 0 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
.ip-archive-hero__text h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.2;
}
.ip-archive-hero__text p {
    margin: 0;
    max-width: 640px;
    font-size: 1rem;
    opacity: 0.92;
    line-height: 1.6;
}
/* Breadcrumb lines up with the header (same side spacing at every width) */
.ip-archive-page .ip-breadcrumb__inner {
    max-width: 100%;
    padding-left: 64px;
    padding-right: 64px;
}

/* ── FILTERS ──────────────────────────────────────────────────── */
.ip-archive-filters {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    flex-wrap: wrap;
    align-items: flex-end;
}
.ip-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ip-filter-group label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ip-link-blue);
}
.ip-filter-select,
.ip-filter-group input[type="text"] {
    padding: 7px 12px;
    border: 1px solid var(--ip-border);
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
    min-width: 140px;
    transition: var(--ip-transition);
}
.ip-filter-select:focus,
.ip-filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--ip-primary);
    box-shadow: 0 0 0 3px rgba(38,166,154,0.1);
}
.ip-search-group {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0; /* button sits flush against the search box */
}
.ip-search-group input[type="text"] {
    border-radius: 8px 0 0 8px;
    min-width: 180px;
}
#ip-search-btn,
#ip-evt-search-btn {
    padding: 7px 14px;
    background: var(--ip-primary);
    color: #fff;
    border: 1px solid var(--ip-primary);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: var(--ip-transition);
}
#ip-search-btn:hover,
#ip-evt-search-btn:hover {
    background: var(--ip-primary-dark);
}

/* ── BODY WRAPPER ─────────────────────────────────────────────── */
.ip-archive-body { background: var(--ip-bg-soft); }
.ip-archive-body__inner {
    max-width: 100%;
    margin: 0;
    padding: 20px 64px;
}

/* ── META BAR ─────────────────────────────────────────────────── */
.ip-archive-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.ip-archive-meta__count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ip-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ip-archive-meta__count i { color: var(--ip-primary); }

/* ── RELEASE CARDS ───────────────────────────────────────────── */
.ip-releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.ip-release-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid var(--ip-primary);
    border-radius: 12px;
    padding: 18px 20px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    /* No fixed minimum height: the card is as tall as its content, so there
       is no empty gap above "View Details". In a row of cards the link still
       lines up at the bottom (margin-top: auto on .ip-release-card__cta). */
}
.ip-release-card:hover {
    border-left-color: var(--ip-primary-dark);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* ── Dot Indicators ─────────────────────────────────────────── */
.ip-release-card__dot-indicator {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

/* Upcoming - different urgency levels */
.ip-dot-urgency-high {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.3);
}
.ip-dot-urgency-medium {
    background: #f39c12;
    box-shadow: 0 0 6px rgba(243, 156, 18, 0.3);
}
.ip-dot-urgency-low {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.3);
}

/* Delayed */
.ip-dot-delayed {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.3);
    animation: ipCardDotPulseDelayed 2s ease-in-out infinite;
}

/* Published */
.ip-dot-published {
    background: #95a5a6;
    box-shadow: 0 0 6px rgba(149, 165, 166, 0.3);
}

/* Soft glow for the delayed dot on archive cards. (Separate name: it used to
   share "ipDotPulseDelayed" with the homepage timeline dot and overrode it.) */
@keyframes ipCardDotPulseDelayed {
    0%, 100% { box-shadow: 0 0 6px rgba(231, 76, 60, 0.3); }
    50%       { box-shadow: 0 0 14px rgba(231, 76, 60, 0.6); }
}

/* ── Card Header ──────────────────────────────────────────────── */
/* Type badge on the left, countdown/status on the right; wraps to a second
   line rather than squeezing. Right padding keeps clear of the status dot. */
.ip-release-card__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 6px;
    padding-right: 16px;
}
.ip-release-card__header > * {
    white-space: nowrap;
}
.ip-release-card__type {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ip-link-blue);
}
.ip-release-card__days {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ip-text-light);
}

/* ── Status Badges ────────────────────────────────────────────── */
.ip-release-card__status-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ip-status-published {
    background: #f0f0f0;
    color: #666;
}
.ip-status-delayed {
    background: #fde8e8;
    color: #c0392b;
}

/* ── Card Title ────────────────────────────────────────────────── */
.ip-release-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}
.ip-release-card__title a {
    color: var(--ip-link-blue);
    text-decoration: none;
    transition: 0.22s ease;
}
.ip-release-card__title a:hover {
    color: var(--ip-primary);
}

/* ── Date ──────────────────────────────────────────────────────── */
.ip-release-card__date {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 8px;
}
.ip-release-card__date i {
    margin-right: 6px;
    color: #bbb;
}

/* ── Delay Reason ─────────────────────────────────────────────── */
.ip-release-card__delay-reason {
    font-size: 0.75rem;
    color: #c0392b;
    background: #fde8e8;
    padding: 4px 10px;
    border-radius: 6px;
    margin: 4px 0 6px;
}
.ip-release-card__delay-reason i {
    margin-right: 6px;
}

/* ── Findings ──────────────────────────────────────────────────── */
.ip-release-card__findings {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 10px;
}
.ip-finding {
    font-size: 0.7rem;
    color: #555;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}
.ip-finding-more {
    font-size: 0.7rem;
    color: #999;
    padding: 3px 8px;
}

/* ── CTA ────────────────────────────────────────────────────────── */
.ip-release-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ip-link-blue);
    text-decoration: none;
    transition: 0.22s ease;
    padding: 6px 0;
}
.ip-release-card__cta i {
    font-size: 0.65rem;
    transition: transform 0.22s ease;
}
.ip-release-card__cta:hover {
    color: var(--ip-primary-dark);
}
.ip-release-card__cta:hover i {
    transform: translateX(3px);
}

/* ── FOOTER ────────────────────────────────────────────────────── */
.ip-archive-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--ip-border);
}
.ip-archive-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ip-link-blue);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 40px;
    border: 1.5px solid var(--ip-link-blue);
    background: #fff;
    transition: var(--ip-transition);
}
.ip-archive-back-btn:hover {
    border-color: var(--ip-primary);
    color: var(--ip-primary-dark);
    background: rgba(38,166,154,0.05);
}

/* ── EMPTY STATE ──────────────────────────────────────────────── */
.ip-archive-empty {
    text-align: center;
    color: var(--ip-text-light);
    font-style: italic;
    padding: 60px 0;
    font-size: 0.95rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Main widget */
@media (max-width: 1100px) {
    .infopanel-tab-btn   { padding: 8px 18px; font-size: .85rem; }
}
@media (max-width: 900px) {
    .infopanel-container        { flex-direction: column; gap: 24px; padding: 0 24px; }
    .infopanel-mv-grid          { grid-template-columns: 1fr; }
    .infopanel-feedback-section { padding: 14px 24px; }

    /* When columns stack, right col reverts to auto height.
       Give the event inner a minimum so the banner isn't too thin. */
    .infopanel-right            { display: flex; flex-direction: column; }
    .ip-event-inner             { min-height: 200px; }
    .infopanel-ql-strip__inner  { padding: 0 24px; gap: 14px; }
}

/* ── MOBILE: true edge-to-edge layout ─────────────────────────────
   The -50vw breakout on .wp-infopanel-block only works when the
   theme parent has overflow:visible. On mobile many theme wrappers
   clip it. Instead we use a fixed-position-style trick: force the
   block to use the viewport width directly, with no left/right math
   that depends on the parent's rendered width.
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Step 1: make every ancestor non-clipping */
    html, body,
    .site, #page, #content, #primary, #main,
    .site-content, .site-main,
    .content-area, .entry-content,
    .page-content, .post, .page {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    /* Step 2: full-width breakout using fixed viewport units */
    .wp-infopanel-block {
        position: relative !important;
        /* Reset any left/right positioning */
        left:  0 !important;
        right: 0 !important;
        /* Pull to true viewport edges regardless of parent padding */
        margin-left:  calc( 50% - var(--ip-vw) / 2 ) !important;
        margin-right: calc( 50% - var(--ip-vw) / 2 ) !important;
        width:     var(--ip-vw) !important;
        max-width: var(--ip-vw) !important;
        /* Remove all top spacing */
        margin-top:  0 !important;
        padding-top: 0 !important;
        padding-bottom: 12px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Step 3: container — zero padding so tile touches the edges */
    .infopanel-container {
        padding: 0 !important;
        gap: 0 !important;
        flex-direction: column;
    }

    /* Step 4: tile — remove card chrome on mobile, full width */
    .infopanel-tile {
        border-radius: 0 !important;
        border-left:   0 !important;
        border-right:  0 !important;
        box-shadow:    none !important;
        padding: 16px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .infopanel-tab-btn          { padding: 6px 14px; font-size: .8rem; }
    .infopanel-see-all-wrap     { text-align: center; }
    .infopanel-feedback-section { padding: 14px 16px !important; }

    /* Events tile — stack vertically on mobile */
    .infopanel-events-tile      { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; box-shadow: none !important; }
    .ip-event-inner             { flex-direction: column; overflow: visible; border-radius: 0; }
    .ip-event-banner            { flex: none; width: 100%; height: 200px; min-height: 200px; border-radius: 0 !important; }
    .ip-event-banner__img       { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .ip-event-body              { flex: none; width: 100%; padding: 16px 16px 18px; border-radius: 0 !important; }
    .ip-event-banner__tag       { font-size: 1rem; }
    .ip-event-title             { font-size: 0.9rem; }

    /* QL strip — flush on mobile */
    .infopanel-ql-strip__inner  { padding: 0 16px; gap: 10px; }
    .infopanel-ql-strip__heading { display: none; } /* save horizontal space */
    .infopanel-ql-strip__links  { gap: 6px; }
    .infopanel-ql-strip__item   { font-size: 0.78rem; padding: 6px 12px; }
}

@media (max-width: 480px) {
    .infopanel-tile             { padding: 14px 12px !important; }
    .infopanel-tab-btn          { padding: 6px 10px; font-size: .75rem; }
    .infopanel-feedback-section { padding: 12px !important; }
}

/* Archive pages */
@media (max-width: 1100px) {
    .ip-archive-hero__inner,
    .ip-archive-body__inner  { padding: 30px 32px; }
    .ip-archive-hero__inner  { padding-top: 44px; padding-bottom: 44px; }
    .ip-archive-page .ip-breadcrumb__inner { padding-left: 32px; padding-right: 32px; }
    .ip-releases-grid        { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
@media (max-width: 768px) {
    .ip-archive-hero__inner,
    .ip-archive-body__inner  { padding: 24px 20px; }
    .ip-archive-hero__inner  { padding-top: 32px; padding-bottom: 32px; gap: 16px; align-items: flex-start; }
    .ip-archive-page .ip-breadcrumb__inner { padding-left: 20px; padding-right: 20px; }
    .ip-releases-grid        { grid-template-columns: 1fr; }
    .ip-archive-hero__icon   { flex-basis: 52px; width: 52px; height: 52px; border-radius: 14px; }
    .ip-archive-hero__icon i { font-size: 22px; }
    /* Stacked filters: each one full width, left aligned */
    .ip-archive-filters      { flex-direction: column; align-items: stretch; gap: 12px; }
    .ip-filter-group         { width: 100%; }
    .ip-filter-select,
    .ip-filter-group input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; min-height: 44px; font-size: 16px; }
    .ip-search-group input[type="text"] { flex: 1 1 auto; width: auto; }
    #ip-search-btn,
    #ip-evt-search-btn       { flex: 0 0 52px; }
}
@media (max-width: 480px) {
    .ip-archive-hero__inner,
    .ip-archive-body__inner  { padding: 18px 14px; }
    .ip-archive-hero__inner  { padding-top: 28px; padding-bottom: 28px; }
    .ip-archive-page .ip-breadcrumb__inner { padding-left: 14px; padding-right: 14px; }
}

/* ================================================================
   MODAL
   ================================================================ */

#infopanelModal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.infopanel-modal-box {
    background: #fff;
    max-width: 460px;
    margin: 1.5rem;
    border-radius: 28px;
    padding: 28px 30px;
    box-shadow: 0 30px 40px rgba(0,0,0,0.2);
    font-family: 'Inter','Segoe UI',system-ui,-apple-system,'Roboto',sans-serif;
    animation: ipFadeSlide 0.22s ease;
}
.infopanel-modal-box h3 { font-weight: 700; color: var(--ip-primary-dark); margin-bottom: 14px; font-size: 1.5rem; }
.infopanel-modal-box p  { color: var(--ip-text-mid); line-height: 1.55; margin-bottom: 22px; }
.infopanel-modal-box button {
    background: var(--ip-primary); border: none; padding: 10px 28px;
    border-radius: 40px; color: #fff; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: .2s;
}
.infopanel-modal-box button:hover { background: var(--ip-primary-dark); }
/* =============================================================================
   FULL-WIDTH: parent overflow fix + large-screen padding
   ============================================================================= */

/* Prevent theme containers from clipping the full-width breakout.
   Must apply at ALL breakpoints. */
html body .site,
html body #page,
html body #content,
html body #primary,
html body #main,
html body .site-content,
html body .site-main,
html body .content-area,
html body .entry-content,
html body .entry-content > p,
html body .page-content,
html body .post,
html body .page {
    overflow-x: visible !important;
}

/* Remove any top margin/padding the theme or WP injects before the block */
.entry-content > :first-child,
.entry-content > p:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Wider side padding on large screens */
@media (min-width: 1600px) {
    .infopanel-container,
    .ip-archive-hero__inner,
    .ip-archive-body__inner {
        padding-left: 64px;
        padding-right: 64px;
    }
}

@media (min-width: 1920px) {
    .infopanel-container,
    .ip-archive-hero__inner,
    .ip-archive-body__inner,
    .ip-archive-page .ip-breadcrumb__inner {
        padding-left: 80px;
        padding-right: 80px;
    }
}

/* ================================================================
   FEEDBACK / RATING SECTION - NO DIVIDER, FIXED LAYOUT
   ================================================================ */

.infopanel-feedback-section {
    margin-top: 0;
    padding: 14px 48px;
    background: var(--ip-bg-card, #fff);
    width: 100%;
    box-sizing: border-box;
}


/* ── Feedback Options Container ────────────────────────────────── */
.ip-feedback-option {
    padding: 6px 0;
}

.ip-feedback-option:first-child {
    padding-top: 0;
}

/* ── Star Rating ───────────────────────────────────────────────── */
.infopanel-star-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    cursor: default;
    flex-wrap: wrap;
}

.infopanel-star-rating .ip-feedback-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ip-text-mid);
    white-space: nowrap;
    margin-right: 2px;
}

.infopanel-star-rating .ip-star {
    font-size: 1.8rem;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
}

.infopanel-star-rating .ip-star:hover {
    transform: scale(1.15);
}

.infopanel-star-rating .ip-rating-text {
    font-size: 0.8rem;
    color: var(--ip-text-light);
    margin-left: 10px;
    font-weight: 500;
}

.ip-rating-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #27ae60;
}

.ip-rating-success i {
    font-size: 1.2rem;
}

/* ── No Divider - Removed ──────────────────────────────────────── */
/* .ip-feedback-divider removed */

/* ── Collapsible Toggle ────────────────────────────────────────── */
.ip-feedback-toggle {
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ip-bg-soft);
    border: 1px solid var(--ip-border);
    transition: all 0.25s ease;
    user-select: none;
    margin-top: 4px;
}

.ip-feedback-toggle:hover {
    background: rgba(38, 166, 154, 0.06);
    border-color: var(--ip-primary);
}

.ip-feedback-toggle-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ip-text-mid);
}

.ip-feedback-toggle-content .ip-toggle-icon {
    color: var(--ip-primary);
    font-size: 1rem;
}

.ip-feedback-toggle-content .ip-toggle-label {
    flex: 1;
}

.ip-feedback-toggle-content .ip-toggle-arrow {
    transition: transform 0.3s ease;
    color: var(--ip-text-light);
    font-size: 0.85rem;
}

.ip-feedback-toggle[aria-expanded="true"] .ip-toggle-arrow {
    transform: rotate(180deg);
}

.ip-feedback-toggle[aria-expanded="true"] {
    border-color: var(--ip-primary);
    background: rgba(38, 166, 154, 0.04);
}

/* ── Collapsible Content ────────────────────────────────────────── */
.ip-feedback-collapsible {
    overflow: hidden;
}

.ip-feedback-collapsible.ip-collapsed {
    display: none;
}

.ip-feedback-collapsible.ip-expanded {
    display: block;
    animation: ipSlideDown 0.3s ease forwards;
}
@keyframes ipSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Issue Submission Form ────────────────────────────────────── */
.ip-feedback-issue-form {
    background: var(--ip-bg-soft);
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
    border: 1px solid var(--ip-border);
}

.ip-feedback-prompt {
    font-size: 0.85rem;
    color: var(--ip-text-mid);
    margin: 0 0 12px 0;
    font-weight: 500;
}

.ip-feedback-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ip-feedback-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--ip-text-mid);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.ip-feedback-options label:hover {
    background: rgba(38, 166, 154, 0.05);
}

.ip-feedback-options input[type="radio"] {
    accent-color: var(--ip-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ip-feedback-textarea {
    margin-top: 8px;
}

.ip-feedback-textarea label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ip-text-mid);
    margin-bottom: 4px;
}

.ip-feedback-textarea label small {
    font-weight: 400;
    color: var(--ip-text-light);
    display: block;
    font-size: 0.7rem;
    margin-top: 2px;
}

.ip-feedback-textarea textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ip-border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ip-feedback-textarea textarea:focus {
    outline: none;
    border-color: var(--ip-primary);
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.1);
}

.ip-character-count {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: var(--ip-text-light);
    margin-top: 4px;
}

.ip-feedback-submit {
    margin-top: 12px;
    padding: 10px 24px;
    background: var(--ip-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.5;
    transition: all 0.22s ease;
    width: 100%;
    font-family: inherit;
}

.ip-feedback-submit:hover:not(:disabled) {
    background: var(--ip-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.2);
}

.ip-feedback-submit:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.ip-issue-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #27ae60;
}

.ip-issue-success i {
    font-size: 1.2rem;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .infopanel-star-rating .ip-star {
        font-size: 1.5rem;
    }
    
    .ip-feedback-toggle-content {
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .ip-feedback-issue-form {
        padding: 12px;
    }
    
    .ip-feedback-options label {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}
/* ================================================================
   DEPARTMENTS PAGE  (shortcode + detail)
   ================================================================ */

/* ── LIST PAGE HERO ───────────────────────────────────────────── */
.ip-dept-page {
    font-family: 'Inter','Segoe UI',system-ui,-apple-system,'Roboto',sans-serif;
    color: var(--ip-text-dark);
    background: var(--ip-bg-soft);
    min-height: 60vh;
}
.ip-dept-hero {
    background: linear-gradient(135deg, var(--ip-primary) 0%, var(--ip-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
/* Same layout as the Job Opportunities / Bids & Tenders headers. */
.ip-dept-hero__inner {
    max-width: 100%;
    padding: 44px 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.ip-dept-hero__icon {
    flex: 0 0 72px;
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    display: flex; align-items: center; justify-content: center;
}
.ip-dept-hero__icon i  { font-size: 30px; color: #fff; }
.ip-dept-hero__text    { min-width: 0; }
.ip-dept-hero__text .ip-dept-hero__eyebrow {
    margin: 0 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
.ip-dept-hero__text h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
    color: #fff;
}
.ip-dept-hero__text p  { margin: 0; max-width: 640px; font-size: 1rem; line-height: 1.6; opacity: 0.92; }

/* Breadcrumb lines up with the header text on the Departments pages
   (same side spacing as the hero; see the responsive block below). */
.ip-dept-page .ip-breadcrumb__inner,
.ip-dept-detail-page .ip-breadcrumb__inner {
    max-width: 100%;
    padding-left: 64px;
    padding-right: 64px;
}

/* ── LIST BODY ────────────────────────────────────────────────── */
.ip-dept-body { background: var(--ip-bg-soft); }
.ip-dept-body__inner {
    max-width: 100%;
    padding: 40px 64px 60px;
    box-sizing: border-box;
}

/* ── DEPARTMENT CARDS GRID ────────────────────────────────────── */
.ip-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.ip-dept-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--ip-border);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    box-shadow: var(--ip-shadow);
    cursor: pointer;
}
.ip-dept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: var(--ip-dept-color, #00897b);
}

/* Coloured top accent bar */
.ip-dept-card__top {
    height: 6px;
    background: var(--ip-dept-color, #00897b);
}

.ip-dept-card__body {
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.ip-dept-card__icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ip-dept-color, #00897b) 12%, #fff);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.22s ease;
}
.ip-dept-card:hover .ip-dept-card__icon {
    background: color-mix(in srgb, var(--ip-dept-color, #00897b) 20%, #fff);
}
.ip-dept-card__icon i {
    font-size: 2rem;
    color: var(--ip-dept-color, #00897b);
}

.ip-dept-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ip-text-dark);
    line-height: 1.3;
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.ip-dept-footer {
    padding-top: 20px;
    border-top: 1px solid var(--ip-border);
}
.ip-dept-empty {
    text-align: center;
    color: var(--ip-text-light);
    padding: 60px 0;
    font-size: 0.95rem;
    font-style: italic;
}

/* ================================================================
   DEPARTMENT DETAIL PAGE
   ================================================================ */
.ip-dept-detail-page {
    font-family: 'Inter','Segoe UI',system-ui,-apple-system,'Roboto',sans-serif;
    color: var(--ip-text-dark);
    background: var(--ip-bg-soft);
    min-height: 70vh;
}

/* ── DETAIL HERO ──────────────────────────────────────────────── */
.ip-dept-detail-hero {
    background: linear-gradient(135deg, var(--ip-dept-color, #00897b) 0%, color-mix(in srgb, var(--ip-dept-color, #00897b) 70%, #000) 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
/* Same layout as the Job Opportunities / Bids & Tenders headers:
   icon box on the left, small label + title on the right. */
.ip-dept-detail-hero__inner {
    max-width: 100%;
    padding: 44px 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.ip-dept-detail-hero__text {
    min-width: 0;
}
.ip-dept-detail-hero__eyebrow {
    margin: 0 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.85;
}
.ip-dept-detail-back {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.ip-dept-detail-back:hover { color: #fff; }
.ip-dept-detail-hero__badge {
    flex: 0 0 72px;
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    display: flex; align-items: center; justify-content: center;
}
.ip-dept-detail-hero__badge i { font-size: 30px; color: #fff; }
.ip-dept-detail-hero__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #fff;
}

/* ── TAB NAV ──────────────────────────────────────────────────── */
.ip-dept-detail-tabs {
    background: #fff;
    border-bottom: 1px solid var(--ip-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ip-dept-detail-tabs__inner {
    max-width: 100%;
    padding: 14px 64px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.ip-dept-tab-btn {
    background: transparent;
    border: 2px solid #ccc;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--ip-text-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.ip-dept-tab-btn:hover {
    border-color: var(--ip-dept-color, #00897b);
    color: var(--ip-dept-color, #00897b);
    background: rgba(0,0,0,0.02);
}
.ip-dept-tab-btn.active {
    background: var(--ip-dept-color, #00897b);
    border-color: var(--ip-dept-color, #00897b);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ip-dept-tab-btn i { font-size: 0.85rem; }

/* ── TAB CONTENT ──────────────────────────────────────────────── */
.ip-dept-detail-body { background: var(--ip-bg-soft); }
.ip-dept-detail-body__inner {
    max-width: 100%;
    padding: 40px 64px 60px;
    box-sizing: border-box;
}

.ip-dept-tab-content {
    display: none;
    animation: ipFadeSlide 0.25s ease;
}
.ip-dept-tab-content.active { display: block; }

/* ── OVERVIEW LAYOUT ──────────────────────────────────────────── */
.ip-dept-overview-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    padding: 36px;
    border: 1px solid var(--ip-border);
    box-shadow: var(--ip-shadow);
}
.ip-dept-overview-image {
    flex-shrink: 0;
    width: 360px;
    max-width: 45%;
}
.ip-dept-overview-image img {
    width: 100%;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.ip-dept-overview-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ip-text-mid);
}
.ip-dept-overview-text p { margin: 0 0 1em; }

/* ── PERSON CARD (Director / Deputy) ─────────────────────────── */
.ip-dept-person-card {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    padding: 36px;
    border: 1px solid var(--ip-border);
    box-shadow: var(--ip-shadow);
}
.ip-dept-person-card__photo {
    flex-shrink: 0;
    width: 160px; height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--ip-dept-color, #00897b);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.ip-dept-person-card__photo img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.ip-dept-person-card__photo--placeholder {
    background: color-mix(in srgb, var(--ip-dept-color, #00897b) 10%, #fff);
    display: flex; align-items: center; justify-content: center;
}
.ip-dept-person-card__photo--placeholder i {
    font-size: 3rem;
    color: var(--ip-dept-color, #00897b);
    opacity: 0.5;
}
.ip-dept-person-card__info { flex: 1; }
.ip-dept-person-card__name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ip-text-dark);
    margin: 0 0 4px;
}
.ip-dept-person-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ip-dept-color, #00897b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
}
.ip-dept-person-card__bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ip-text-mid);
}
.ip-dept-person-card__bio p { margin: 0 0 0.8em; }
.ip-dept-person-card__bio--empty {
    color: var(--ip-text-light);
    font-style: italic;
    margin: 0;
}

/* ── DEPT DETAIL FOOTER ───────────────────────────────────────── */
.ip-dept-detail-footer {
    padding: 24px 64px 40px;
    background: var(--ip-bg-soft);
}

/* ================================================================
   DEPARTMENTS RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .ip-dept-body__inner,
    .ip-dept-hero__inner,
    .ip-dept-detail-hero__inner,
    .ip-dept-detail-tabs__inner,
    .ip-dept-detail-body__inner,
    .ip-dept-detail-footer,
    .ip-dept-page .ip-breadcrumb__inner,
    .ip-dept-detail-page .ip-breadcrumb__inner { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 768px) {
    .ip-dept-page .ip-breadcrumb__inner,
    .ip-dept-detail-page .ip-breadcrumb__inner { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 768px) {
    .ip-dept-hero__inner            { padding: 32px 16px; gap: 16px; align-items: flex-start; }
    .ip-dept-hero__icon             { flex-basis: 52px; width: 52px; height: 52px; border-radius: 14px; }
    .ip-dept-hero__icon i           { font-size: 22px; }
    .ip-dept-body__inner            { padding: 24px 16px 40px; }
    .ip-dept-grid                   { grid-template-columns: repeat(2, 1fr); gap: 14px; }

    .ip-dept-detail-hero__inner     { padding: 32px 16px; gap: 16px; }
    .ip-dept-detail-hero__badge     { flex-basis: 52px; width: 52px; height: 52px; border-radius: 14px; }
    .ip-dept-detail-hero__badge i   { font-size: 22px; }
    .ip-dept-detail-tabs__inner     { padding: 0 4px; overflow-x: auto; }
    .ip-dept-tab-btn                { padding: 12px 16px; font-size: 0.82rem; white-space: nowrap; }
    .ip-dept-detail-body__inner     { padding: 20px 14px 40px; }
    .ip-dept-detail-footer          { padding: 16px 16px 32px; }

    .ip-dept-overview-layout        { flex-direction: column; padding: 20px; gap: 20px; }
    .ip-dept-overview-image         { width: 100%; max-width: 100%; }

    .ip-dept-person-card            { flex-direction: column; align-items: center; text-align: center; padding: 24px 16px; gap: 20px; }
    .ip-dept-person-card__photo     { width: 120px; height: 120px; }
    .ip-dept-person-card__name      { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .ip-dept-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ip-dept-card__body             { padding: 20px 12px 16px; gap: 10px; }
    .ip-dept-card__icon             { width: 56px; height: 56px; }
    .ip-dept-card__icon i           { font-size: 1.6rem; }
    .ip-dept-card__name             { font-size: 0.85rem; }
}
/* ==========================================================================
   EVENTS ARCHIVE PAGE  –  event cards
   ========================================================================== */

.ip-events-section { margin-bottom: 48px; }

.ip-events-section__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}
.ip-events-section__heading i { color: var(--nso-teal, #26a69a); }
.ip-events-section__count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(38,166,154,0.12);
    color: var(--nso-teal, #26a69a);
    padding: 2px 10px;
    border-radius: 20px;
}

/* Card grid — 3 columns desktop, 2 tablet, 1 mobile */
.ip-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .ip-events-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .ip-events-grid { grid-template-columns: 1fr; } }

/* Individual card */
.ip-event-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ip-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}
.ip-event-card--past { opacity: 0.85; }
.ip-event-card--past:hover { opacity: 1; }

/* Thumbnail */
.ip-event-card__thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ip-event-card__thumb--placeholder {
    background: linear-gradient(135deg, var(--nso-teal, #26a69a) 0%, var(--nso-teal-dark, #00897b) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ip-event-card__thumb--placeholder i {
    font-size: 2.8rem;
    color: rgba(255,255,255,0.3);
}

/* Body */
.ip-event-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta row (badge + days counter) */
.ip-event-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ip-event-card__badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ip-event-card__badge--upcoming { background: rgba(38,166,154,0.12); color: var(--nso-teal, #26a69a); }
.ip-event-card__badge--past     { background: rgba(100,100,100,0.1);  color: #718096; }
.ip-event-card__days {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: #e67e22;
}

/* Title */
.ip-event-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    line-height: 1.35;
}
.ip-event-card__title a { color: inherit; text-decoration: none; }
.ip-event-card__title a:hover { color: var(--nso-teal, #26a69a); }

/* Date / location info */
.ip-event-card__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 10px;
}
.ip-event-card__info i { color: var(--nso-teal, #26a69a); margin-right: 5px; }

/* Excerpt */
.ip-event-card__excerpt {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
}

/* Reuse the releases CTA button style — already defined in main CSS */

/* "All Events & Announcements" secondary link on the dashboard panel */
.ip-event-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s ease;
}
.ip-event-all-link:hover { color: #fff; }
.ip-event-all-link i { font-size: 0.72rem; }
/* ── Recurring release badge ─────────────────────────────────── */
.ip-release-card__recurring {
    font-weight: 600;
    color: var(--ip-text-light);
    margin-left: 4px;
    white-space: nowrap;
}
.ip-release-card__recurring i { font-size: 0.85em; margin: 0 2px; }
.ip-detail-recurring { color: var(--ip-text-mid); }

/* ── Links and formatting inside descriptions (from the text editor) ── */
.ip-detail-description a,
.ip-event-detail-description a,
.ip-dept-overview-text a {
    color: var(--ip-link-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}
.ip-detail-description a:hover,
.ip-event-detail-description a:hover,
.ip-dept-overview-text a:hover { color: var(--ip-primary-dark); }
.ip-detail-description ul,
.ip-detail-description ol,
.ip-event-detail-description ul,
.ip-event-detail-description ol { margin: 0 0 16px 1.4em; }
.ip-detail-description li,
.ip-event-detail-description li { margin-bottom: 4px; }


/* ================================================================
   SITE-WIDE CONSISTENCY
   Same font, type badge and title colour as the home page and the
   publications search (shared --nso-* values in theme-style.css).
   ================================================================ */

/* Form controls in InfoPanel (feedback, filters): site font, not the
   Elementor kit's Quicksand. Icon fonts (<i class="fas">) are untouched. */
.wp-infopanel-block label, .wp-infopanel-block input, .wp-infopanel-block textarea,
.wp-infopanel-block select, .wp-infopanel-block button,
.infopanel-feedback-section label, .infopanel-feedback-section textarea,
.infopanel-feedback-section button {
    font-family: var(--nso-font, inherit);
}

/* Release text pasted from Google Docs/Word carries its own fonts
   (e.g. "Google Sans"); show it in the site font. */
.ip-detail-description, .ip-detail-description * {
    font-family: var(--nso-font, inherit) !important;
}

/* Card titles that link to a page: link blue, as on the home page and search. */
.ip-release-card__title, .ip-release-card__title a,
.ip-event-card__title, .ip-event-card__title a {
    color: var(--nso-link, #1a56a0);
}

/* Publication type label: the shared teal pill. */
.ip-release-card__type,
body .ip-detail-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    background: var(--nso-teal-tint, rgba(38,166,154,0.09));
    /* !important: the release page also sets each type admin colour inline */
    color: var(--nso-teal-dark, #00897b) !important;
    border: 1px solid var(--nso-teal-line, rgba(38,166,154,0.22)) !important;
    border-radius: var(--nso-radius-pill, 20px);
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}