/**
 * NRB Banking Indicators - Frontend Styles
 * Version: 2.0.1
 */

/* Main Container */
.nrb-indicators-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 15px 0;
    max-width: 100%;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}

.nrb-indicators-title {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ==========================================================================
   Marquee / Ticker Style
   ========================================================================== */
.nrb-indicators-marquee {
    overflow: hidden;
    white-space: nowrap;
    background: #0b192c;
    padding: 10px 0;
    position: relative;
    border-radius: 6px;
    min-height: 48px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.nrb-marquee-heading {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #004d99;
    color: #ffffff;
    padding: 0 18px;
    font-weight: 700;
    font-size: 0.88em;
    z-index: 10;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 3px 0 8px rgba(0, 0, 0, 0.25);
}

.nrb-marquee-content {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    animation: nrbMarqueeScroll 60s linear infinite;
    padding-left: 130px;
}

.nrb-marquee-item {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    margin: 0 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 500;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.nrb-marquee-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nrb-marquee-icon {
    margin-right: 6px;
    font-size: 1.05em;
}

.nrb-marquee-symbol {
    font-weight: 700;
    margin-right: 6px;
    color: #ffd166;
    letter-spacing: 0.3px;
}

.nrb-marquee-value {
    font-weight: 600;
    margin: 0 4px;
    font-family: 'Segoe UI', monospace;
}

.nrb-marquee-unit {
    opacity: 0.75;
    font-size: 0.82em;
    margin-left: 3px;
}

.nrb-marquee-change {
    font-weight: 700;
    font-size: 0.85em;
    margin-left: 5px;
}

.nrb-marquee-positive {
    color: #06d6a0;
}

.nrb-marquee-negative {
    color: #ef476f;
}

.nrb-marquee-neutral {
    color: #ffffff;
}

@keyframes nrbMarqueeScroll {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

.nrb-indicators-marquee:hover .nrb-marquee-content {
    animation-play-state: paused;
}

/* ==========================================================================
   Table Style
   ========================================================================== */
.nrb-indicators-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.nrb-indicators-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.82em;
    line-height: 1.35;
    text-align: left;
}

.nrb-indicators-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.nrb-indicators-table th {
    padding: 7px 10px;
    font-weight: 600;
    font-size: 0.78em;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.nrb-indicators-table th:nth-child(2),
.nrb-indicators-table th:nth-child(3) {
    text-align: right;
}

.nrb-indicators-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

.nrb-indicators-table tbody tr:hover {
    background-color: #f8fafc;
}

.nrb-indicators-table tbody tr:last-child td {
    border-bottom: none;
}

.nrb-indicator-name {
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    font-size: 0.95em;
    line-height: 1.25;
}

.nrb-indicator-icon {
    margin-right: 6px;
    font-size: 1.05em;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.nrb-indicator-value {
    font-weight: 600;
    text-align: right;
    font-family: 'Segoe UI', monospace;
    font-size: 0.95em;
    color: #0284c7;
    white-space: nowrap;
}

.nrb-indicator-unit-cell {
    text-align: right;
    color: #64748b;
    font-size: 0.78em;
    font-weight: 500;
    white-space: nowrap;
}

/* ==========================================================================
   Cards Style
   ========================================================================== */
.nrb-indicators-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 18px;
}

.nrb-indicator-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nrb-indicator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.nrb-indicator-card-icon {
    font-size: 2.2em;
    margin-bottom: 10px;
    display: inline-block;
}

.nrb-indicator-card-name {
    font-weight: 600;
    color: #334155;
    font-size: 0.9em;
    margin-bottom: 8px;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nrb-indicator-card-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 4px;
    font-family: 'Segoe UI', monospace;
}

.nrb-indicator-card-unit {
    color: #64748b;
    font-size: 0.8em;
    font-weight: 500;
}

/* ==========================================================================
   Grid Style
   ========================================================================== */
.nrb-indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px;
}

.nrb-indicator-grid-item {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 16px 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
    transition: transform 0.2s ease;
}

.nrb-indicator-grid-item:hover {
    transform: translateY(-2px);
}

.nrb-indicator-grid-name {
    font-size: 0.82em;
    margin-bottom: 6px;
    opacity: 0.92;
    font-weight: 500;
}

.nrb-indicator-grid-value {
    font-size: 1.35em;
    font-weight: 700;
    margin-bottom: 2px;
    font-family: 'Segoe UI', monospace;
}

.nrb-indicator-grid-unit {
    font-size: 0.72em;
    opacity: 0.82;
}

/* ==========================================================================
   Footer & Meta
   ========================================================================== */
.nrb-indicators-source {
    text-align: center;
    font-size: 0.72em;
    color: #64748b;
    padding: 7px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
}

.nrb-indicators-notice {
    text-align: center;
    padding: 14px;
    color: #92400e;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 0.85em;
}

/* ==========================================================================
   Size Modifiers
   ========================================================================== */
.nrb-indicators-container.nrb-size-small {
    font-size: 0.9em;
}

.nrb-indicators-container.nrb-size-small .nrb-indicators-title {
    font-size: 0.88em;
    padding: 8px 12px;
}

.nrb-indicators-container.nrb-size-small .nrb-indicators-table th,
.nrb-indicators-container.nrb-size-small .nrb-indicators-table td {
    padding: 5px 7px;
}

.nrb-indicators-container.nrb-size-xs {
    font-size: 0.8em;
}

.nrb-indicators-container.nrb-size-xs .nrb-indicators-title {
    font-size: 0.8em;
    padding: 6px 10px;
}

.nrb-indicators-container.nrb-size-xs .nrb-indicators-table th,
.nrb-indicators-container.nrb-size-xs .nrb-indicators-table td {
    padding: 4px 6px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .nrb-indicators-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
        padding: 12px;
    }

    .nrb-indicators-table th,
    .nrb-indicators-table td {
        padding: 6px 8px;
        font-size: 0.76em;
    }

    .nrb-marquee-heading {
        padding: 0 10px;
        font-size: 0.78em;
    }

    .nrb-marquee-content {
        padding-left: 95px;
    }

    .nrb-marquee-item {
        margin: 0 6px;
        padding: 5px 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .nrb-indicators-cards {
        grid-template-columns: 1fr;
    }

    .nrb-indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nrb-indicators-table th,
    .nrb-indicators-table td {
        padding: 5px 6px;
        font-size: 0.72em;
    }

    .nrb-marquee-heading {
        padding: 0 8px;
        font-size: 0.72em;
    }

    .nrb-marquee-content {
        padding-left: 78px;
    }

    .nrb-marquee-item {
        margin: 0 4px;
        padding: 4px 8px;
        font-size: 0.75em;
    }
}