/* ==========================================================================
   RankwellPress Pro
   Utility Section — Completely Flat & Seamless Version
   Rows aligned · Breaking · Currency · Breadcrumbs

   CUSTOMIZER WIRING — this revision
   ─────────────────────────────────────────────────────────
   Every colour that identifies the site's brand is wired to
   the theme's dynamic CSS variables. Presets, Customizer
   changes, and Reset Colours all affect these elements.

   Tokens read (from DynamicCSSCompiler output):
     --rw-bg-content             (content_bg_color)
     --rw-border-light           (border_color)
     --rw-text-heading           (heading_color)
     --rw-text-muted             (meta_text_color)
     --rw-text-inverse           (primary_text_color)
     --rw-color-primary          (primary_color)
     --rw-container-desktop      (container_width_desktop)

   DESIGN NOTES
   - The entire utility section is now flat. No background, no 
     border, no shadow. It blends perfectly with the page.
   - Both ticker label pills (Breaking + Currency) read
     --rw-color-primary.
   - Ticker item text reads --rw-text-heading.
   - Breadcrumb colours are utility chrome — they follow text
     tokens, not brand. Only the hover state takes brand colour.
   ========================================================================== */

/* ==========================================================================
   FLAT CONTAINER (No Background, No Border)
   ========================================================================== */

.rwp-utility-section {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 8px auto 12px;
    max-width: var(--rw-container-desktop, 1200px);
    overflow: hidden;
    position: relative;
}

/* Hide the top accent line */
.rwp-utility-section::before {
    display: none !important;
}

/* Hide the side accent line */
.rwp-utility-section::after {
    display: none !important;
}

/* ==========================================================================
   FLOW INTO CONTENT
   Neutralise the top margin of the first block below so readers
   reach the stories sooner.
   ========================================================================== */

.rwp-utility-section + * {
    margin-top: 8px;
}

.rwp-utility-section + .rwp-widget,
.rwp-utility-section + .widget,
.rwp-utility-section + section,
.rwp-utility-section + .rankwellpress-posts-wrapper,
.rwp-utility-section + .rankwellpress-hero-grid,
.rwp-utility-section + .rankwellpress-headlines-widget,
.rwp-utility-section + .rankwellpress-flex-news-widget,
.rwp-utility-section + .rankwellpress-featured-news-widget {
    margin-top: 8px;
}

/* ==========================================================================
   ROW RESET — consistent left alignment
   ========================================================================== */

.rwp-utility-section .rwp-breaking-news-ticker,
.rwp-utility-section .rwp-currency-ticker,
.rwp-utility-section .rankwellpress-breadcrumbs {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0 10px !important;
    padding-left: 10px !important;
    box-sizing: border-box;
}

/* ==========================================================================
   CONSISTENT ROW HEIGHT
   34px desktop — tight enough to save vertical space, tall enough
   for label pills and legible ticker text.
   ========================================================================== */

.rwp-utility-section .rwp-breaking-news-ticker,
.rwp-utility-section .rwp-currency-ticker,
.rwp-utility-section .rankwellpress-breadcrumbs,
.rwp-utility-section .rankwellpress-breadcrumbs .rankwellpress-container,
.rwp-utility-section .rwp-currency-ticker-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   DIVIDERS
   Divider only between rows. On non-single views the currency
   ticker becomes the last row, so it shouldn't carry a trailing
   bottom border.
   ========================================================================== */

.rwp-utility-section .rwp-breaking-news-ticker:not(:last-child),
.rwp-utility-section .rwp-currency-ticker:not(:last-child) {
    border-bottom: 1px solid color-mix(in srgb, var(--rw-border-light, #e5e7eb) 40%, transparent);
}

/* ==========================================================================
   LABELS — aligned to the same left edge
   ========================================================================== */

.rwp-utility-section .rwp-ticker-label,
.rwp-utility-section .rwp-currency-ticker-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 12px !important;
    margin-left: 0 !important;
    margin-right: 10px !important;

    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;

    border-radius: 6px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Both labels read the site's Primary Brand colour */
.rwp-utility-section .rwp-ticker-label,
.rwp-utility-section .rwp-currency-ticker-label {
    background: var(--rw-color-primary, #0d7c3e) !important;
    color: var(--rw-text-inverse, #ffffff) !important;
}

/* ==========================================================================
   BREAKING NEWS
   ========================================================================== */

.rwp-utility-section .rwp-ticker-viewport {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 100%;
}

.rwp-utility-section .rwp-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: rwpTickerScroll var(--rwp-ticker-speed, 28s) linear infinite;
}

.rwp-utility-section .rwp-ticker-viewport:hover .rwp-ticker-track {
    animation-play-state: paused;
}

.rwp-utility-section .rwp-ticker-item {
    display: flex;
    align-items: center;
    padding: 0 14px;
    position: relative;
}

.rwp-utility-section .rwp-ticker-item::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rw-color-primary, #0d7c3e) 45%, transparent);

    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
}

.rwp-utility-section .rwp-ticker-item:last-child::after {
    display: none;
}

.rwp-utility-section .rwp-ticker-item-link {
    color: var(--rw-text-heading, #0f1e33) !important;
    text-decoration: none !important;
    font-size: .86rem !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    background: transparent !important;
}

.rwp-utility-section .rwp-ticker-item-link:hover,
.rwp-utility-section .rwp-ticker-item-link:focus-visible {
    color: var(--rw-color-primary, #0d7c3e) !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   CURRENCY
   ========================================================================== */

.rwp-utility-section .rwp-currency-ticker-inner {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 !important;
}

.rwp-utility-section .rwp-currency-ticker-wrapper {
    flex: 1;
    overflow: hidden;
}

.rwp-utility-section .rwp-currency-ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation-name: rwp-ticker-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.rwp-utility-section .rwp-currency-ticker-wrapper:hover .rwp-currency-ticker-track {
    animation-play-state: paused;
}

.rwp-utility-section .rwp-currency-ticker-item {
    display: inline-flex;
    align-items: center;

    font-size: .82rem;
    font-weight: 600;

    color: var(--rw-text-heading, #0f1e33) !important;
    -webkit-text-fill-color: var(--rw-text-heading, #0f1e33) !important;
}

.rwp-utility-section .rwp-currency-ticker-item strong {
    font-weight: 700;
    color: var(--rw-text-heading, #0f1e33) !important;
    -webkit-text-fill-color: var(--rw-text-heading, #0f1e33) !important;
}

.rwp-utility-section .rwp-currency-ticker-item::after {
    content: "•";
    margin: 0 10px;
    color: color-mix(in srgb, var(--rw-text-heading, #0f1e33) 35%, transparent);
}

.rwp-utility-section .rwp-currency-ticker-item:last-child::after {
    display: none;
}

/* ==========================================================================
   BREADCRUMB — Flat & Clean (No Background)
   ========================================================================== */

.rwp-utility-section .rankwellpress-breadcrumbs {
    background: transparent !important;
    width: 100%;
    overflow: hidden; 
}

.rwp-utility-section .rankwellpress-breadcrumbs .rankwellpress-container {
    width: 100%;
    padding: 0 !important;
    display: block; 
    overflow: hidden;
}

/* Force ellipsis on the whole inner container */
.rwp-utility-section .breadcrumb-inner {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .82rem;
    width: 100%;
    line-height: 34px; 
}

/* Ensure links and separators behave inline */
.rwp-utility-section .breadcrumb-item,
.rwp-utility-section .breadcrumb-item a,
.rwp-utility-section .breadcrumb-current,
.rwp-utility-section .breadcrumb-separator {
    display: inline;
    white-space: nowrap;
}

.rwp-utility-section .breadcrumb-item,
.rwp-utility-section .breadcrumb-item a {
    color: var(--rw-text-muted, #6b7280) !important;
    text-decoration: none;
}

.rwp-utility-section .breadcrumb-item a:hover {
    color: var(--rw-color-primary, #0d7c3e) !important;
}

.rwp-utility-section .breadcrumb-current {
    color: var(--rw-text-heading, #0f1e33) !important;
    font-weight: 600;
}

.rwp-utility-section .breadcrumb-separator {
    color: var(--rw-border-light, #cbd5e1);
    margin: 0 4px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes rwpTickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes rwp-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   DARK MODE
   ========================================================================== */

/* Dark mode container stays transparent */
html[data-theme="dark"] .rwp-utility-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .rankwellpress-breadcrumbs {
    background: transparent !important;
}

html[data-theme="dark"] .rwp-ticker-item-link,
html[data-theme="dark"] .rwp-currency-ticker-item,
html[data-theme="dark"] .rwp-currency-ticker-item strong {
    color: var(--rw-text-heading, #f3f4f6) !important;
    -webkit-text-fill-color: var(--rw-text-heading, #f3f4f6) !important;
}

html[data-theme="dark"] .breadcrumb-item,
html[data-theme="dark"] .breadcrumb-item a {
    color: var(--rw-text-muted, #94a3b8) !important;
    -webkit-text-fill-color: var(--rw-text-muted, #94a3b8) !important;
}

html[data-theme="dark"] .breadcrumb-current {
    color: var(--rw-text-heading, #f8fafc) !important;
    -webkit-text-fill-color: var(--rw-text-heading, #f8fafc) !important;
}

html[data-theme="dark"] .breadcrumb-separator {
    color: var(--rw-border-light, #475569);
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {

    .rwp-utility-section {
        border-radius: 0;
        margin: 6px auto 10px;
    }

    .rwp-utility-section .rwp-breaking-news-ticker,
    .rwp-utility-section .rwp-currency-ticker,
    .rwp-utility-section .rankwellpress-breadcrumbs,
    .rwp-utility-section .rankwellpress-breadcrumbs .rankwellpress-container,
    .rwp-utility-section .rwp-currency-ticker-inner {
        min-height: 32px;
    }

    /* Keep left alignment on mobile */
    .rwp-utility-section .rwp-breaking-news-ticker,
    .rwp-utility-section .rwp-currency-ticker,
    .rwp-utility-section .rankwellpress-breadcrumbs {
        padding: 0 8px !important;
        padding-left: 8px !important;
    }

    .rwp-utility-section .rwp-ticker-label,
    .rwp-utility-section .rwp-currency-ticker-label {
        font-size: 10px !important;
        padding: 4px 10px !important;
        margin-left: 0 !important;
        margin-right: 8px !important;
        letter-spacing: .08em !important;
    }

    .rwp-utility-section .rwp-ticker-item-link {
        font-size: .78rem !important;
    }

    .rwp-utility-section .rwp-currency-ticker-item {
        font-size: .76rem;
    }

    .rwp-utility-section .breadcrumb-inner {
        font-size: .74rem;
        line-height: 32px;
    }

    /* Even tighter flow-into-content on mobile */
    .rwp-utility-section + * {
        margin-top: 6px;
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .rwp-utility-section .rwp-ticker-track,
    .rwp-utility-section .rwp-currency-ticker-track {
        animation: none !important;
    }
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .rwp-utility-section {
        display: none !important;
    }
}