/* Component: Scrolling price ticker component. Rules are plugin-scoped (.cbah-*). */
/* ---- MARKET RESEARCH TICKER STYLES ---- */

.cbah-price-ticker {background: #ffffff;    font-family: var(--cbah-body-font, "Josefin Sans", sans-serif);
}

.cbah-ticker-date {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 50px;
    padding: 12px 20px;
    background: #0f172a;
    color: #f8fafc;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.cbah-ticker-date .dashicons {
    flex: 0 0 auto;
    margin-right: 6px;
    font-size: 13px;
    line-height: 14px;
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

.cbah-ticker-wrapper {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    padding: 12px 0;
}

.cbah-ticker-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: max-content;
    margin: 0;
    padding: 0;
    animation: none;
    will-change: transform;
}

.cbah-price-ticker .cbah-ticker-group {flex-direction: row !important;}

.cbah-price-ticker .cbah-ticker-item {font-family: inherit;
    font-size: 12px;    font-weight: 600;
    color: #0f172a;}

.cbah-price-ticker .cbah-ticker-item span {
    display: inline;
    width: auto;
    margin: 0 0 0 3px;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: 700;
    white-space: nowrap;
}

.cbah-ticker-item .cbah-txt-green {
    color: #10b981;
}

.cbah-ticker-item .cbah-txt-red {
    color: #ef4444;
}


/* ==========================================================================
   WP File Download Plugin Overrides (Inside Report Previews)
   ========================================================================== */

/* 1. Force the main wrapper to be a clean, uniform block */
.cbah-preview-text div.wpfd-file,
.cbah-preview-text div[data-wpfdfile],
.cbah-preview-text .wpfd-category {
    display: block !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin-top: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    overflow: hidden !important;
}

/* 2. Reset any broken inner columns/grids */
.cbah-preview-text div[data-wpfdfile] > div,
.cbah-preview-text .wpfd-file > div {
    display: block !important;
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 3. Fix the Title (Remove the yellow, change to standard dark grey) */
.cbah-preview-text div[data-wpfdfile] *[class*="title"],
.cbah-preview-text .wpfd-file *[class*="title"],
.cbah-preview-text div[data-wpfdfile] a,
.cbah-preview-text div[data-wpfdfile] h3 {
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important; /* Standard dark theme color */
    text-decoration: none !important;
    text-transform: none !important;
    display: block !important;
    margin-bottom: 8px !important;
}

/* 4. Format the Metadata (Size, Date) neatly in a row */
.cbah-preview-text div[data-wpfdfile] *[class*="info"],
.cbah-preview-text div[data-wpfdfile] *[class*="size"],
.cbah-preview-text div[data-wpfdfile] *[class*="date"],
.cbah-preview-text .wpfd-file .wpfd-file-meta {
    font-size: 12px !important;
    color: #64748b !important;
    display: inline-block !important;
    margin-right: 12px !important;
    margin-bottom: 12px !important;
}

/* 5. Force buttons into a neat horizontal row */
.cbah-preview-text div[data-wpfdfile] .wpfd-buttons,
.cbah-preview-text div[data-wpfdfile] > div:last-child {
    display: flex !important;
    gap: 10px !important;
    margin-top: 12px !important;
    flex-wrap: wrap !important;
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 12px !important;
}

/* 6. Style the plugin's buttons to match our Dashboard UI */
.cbah-preview-text div[data-wpfdfile] a.btn,
.cbah-preview-text div[data-wpfdfile] a[href*="task=download"],
.cbah-preview-text div[data-wpfdfile] a[href*="task=preview"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    text-transform: capitalize !important;
    box-shadow: none !important;
}

/* 7. Specific color for the DOWNLOAD button */
.cbah-preview-text div[data-wpfdfile] a[href*="task=download"] {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
}
.cbah-preview-text div[data-wpfdfile] a[href*="task=download"]:hover {
    background: #334155 !important;
}

/* 8. Specific color for the PREVIEW button */
.cbah-preview-text div[data-wpfdfile] a[href*="task=preview"] {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
.cbah-preview-text div[data-wpfdfile] a[href*="task=preview"]:hover {
    background: #f8fafc !important;
}

/* Hide giant SVG/Image icons if they load */
.cbah-preview-text div[data-wpfdfile] img[src*="wp-file-download"] {
    display: none !important;
}



/* ==========================================================================\n   MARKET SNAPSHOT / TICKER ISOLATION\n   These rules deliberately use plugin-prefixed selectors and !important only\n   where required to neutralize common theme/Elementor flex, span, and width\n   rules. The host site's typography is otherwise left untouched.\n   ========================================================================== */

.cbah-price-ticker,
.cbah-price-ticker * {
    box-sizing: border-box !important;
}


.cbah-price-ticker .cbah-ticker-date {flex-flow: row nowrap !important;overflow: hidden !important;
    line-height: 1.2 !important;
}




.cbah-price-ticker .cbah-ticker-item {flex-flow: row nowrap !important;line-height: 1.2 !important;
    vertical-align: middle !important;
}


/* Snapshot timestamp follows the same context as the snapshot itself. */
.cbah-marketdata-date.cbah-marketdata-date-home {
    color: #ffffff !important;
    justify-content: center !important;
    text-align: center !important;
}

.cbah-marketdata-date.cbah-marketdata-date-home .dashicons {
    color: #ffffff !important;
}

.cbah-marketdata-date.cbah-marketdata-date-page {
    color: #64748b !important;
    justify-content: flex-end !important;
    text-align: right !important;
}

/* ------------------------------\n   Inner-page snapshot\n   ------------------------------ */
.cbah-home-snapshot.cbah-snapshot-page {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 20px 0 !important;
    padding: 24px 30px !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 18px !important;
}

/* ------------------------------\n   Homepage snapshot\n   ------------------------------ */
.cbah-home-snapshot.cbah-snapshot-home {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    width: 100% !important;    min-width: 0 !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border-left: 1px solid rgba(255,255,255,0.45) !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:first-child {
    padding-left: 0 !important;
    border-left: 0 !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:last-child {
    padding-right: 0 !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-label,
.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-value,
.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-change {
    color: #ffffff !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-label {
    margin: 0 0 6px !important;
    font-family: var(--cbah-heading-font, "Josefin Sans", sans-serif) !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    letter-spacing: 0.7px !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-value {
    margin: 0 0 2px !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-price {
    color: rgba(255,255,255,0.9) !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-change.cbah-txt-green {
    color: #10b981 !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-change.cbah-txt-red {
    color: #ef4444 !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-change.cbah-txt-muted {
    color: rgba(255,255,255,0.85) !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-change .dashicons {
    color: inherit !important;
}

@media (max-width: 900px) {
    .cbah-home-snapshot.cbah-snapshot-page,
    .cbah-home-snapshot.cbah-snapshot-home {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;    }

    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item,
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item {
        padding: 0 14px !important;
    }

    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:nth-child(odd),
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item:nth-child(odd) {
        padding-left: 0 !important;
    }

    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:nth-child(even),
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item:nth-child(even) {
        padding-right: 0 !important;
    }
}

@media (max-width: 600px) {
    
    
    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item,
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item,
    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:nth-child(odd),
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item:nth-child(odd),
    .cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item:nth-child(even),
    .cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item:nth-child(even) {
        width: 100% !important;
        padding: 0 0 12px !important;
        border-left: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    }

/* ==========================================================================
   Spindle Market Research — isolated snapshot/ticker layout
   These final rules are deliberately scoped to plugin components so host
   themes/Elementor cannot recenter, collapse, or restyle their layout.
   ========================================================================== */

/* Snapshot: four columns on desktop; metrics occupy the fourth column. */
.cbah-home-snapshot.cbah-snapshot-page,
.cbah-home-snapshot.cbah-snapshot-home {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;}

.cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item,
.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item {
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.cbah-home-snapshot.cbah-snapshot-page .cbah-snap-item {
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.cbah-home-snapshot.cbah-snapshot-home .cbah-snap-item {
    padding-left: 18px !important;
    padding-right: 18px !important;
}



/* Market turnover/size: each supplied metric is a paired label/value cell. */
.cbah-snap-market-metrics {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;text-align: left !important;
}

.cbah-snap-market-title {margin: 0 0 2px !important;
    font-family: var(--cbah-body-font, "Josefin Sans", sans-serif) !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    letter-spacing: 0.7px !important;
    color: #64748b !important;}

.cbah-snap-metrics-grid {    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;    justify-content: start !important;}

.cbah-snap-metrics-count-1 .cbah-snap-metrics-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

.cbah-snap-metrics-count-2 .cbah-snap-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.cbah-snap-metrics-count-3 .cbah-snap-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.cbah-snap-metric-cell {
    position: relative !important;    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;}


.cbah-snap-metric-cell + .cbah-snap-metric-cell::before {    position: absolute;font-family: var(--cbah-body-font, "Josefin Sans", sans-serif);
}

.cbah-snap-metric-label,
.cbah-snap-metric-value {text-align: left !important;
}

.cbah-snap-metric-label {
    font-family: var(--cbah-body-font, "Josefin Sans", sans-serif) !important;text-transform: uppercase !important;color: #64748b !important;
}

.cbah-snap-metric-value {
    font-family: var(--cbah-body-font, "Josefin Sans", sans-serif) !important;color: #0f172a !important;
}

.cbah-snapshot-home .cbah-snap-market-title,
.cbah-snapshot-home .cbah-snap-metric-label,
.cbah-snapshot-home .cbah-snap-metric-value {
    color: #ffffff !important;
}


/* Homepage only: keep the four market sections compact and centered on desktop. */
.cbah-home-snapshot.cbah-snapshot-home {
    width: min(960px, calc(100% - 32px)) !important;
    max-width: 960px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-self: center !important;
}

/* Preserve the compact desktop width while allowing the snapshot to breathe
   naturally on tablets and phones. */
@media (max-width: 900px) {
    .cbah-home-snapshot.cbah-snapshot-home {
        width: calc(100% - 32px) !important;
        max-width: none !important;
    }
}

@media (max-width: 600px) {
    .cbah-home-snapshot.cbah-snapshot-home {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

