/* /ssd2/arcingtime/Trader/static/css/metrics.css */
:root {
    --bs-border-width: 1px;
    --bs-border-color: rgb(0, 0, 0);
}

td {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

.tooltip {
    z-index: 10000 !important;   /* or 2000, 9999, whatever beats your menu */
}

.tooltip.show {
    opacity: 1; /* sometimes needed when custom z-index is applied */
}

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 3050;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Removed .container-fluid padding-top - not needed in pulse project */

.tab-content {
    margin-top: 10px; /* Below sticky-nav */
}

/* Nav-tabs base styles */
.nav-tabs {
    padding: 5px 0;
}

.ticker-highlight {
    background-color: #007bff; /* Bootstrap primary blue, adjust as needed */
    color: white; /* Ensure text is readable */
    border: 5px solid #0056b3; /* Slightly darker border for contrast */
}

.ticker-description {
    resize: vertical; 
    overflow-y: auto; /* Scroll if content exceeds height */
    padding: 0.25rem 0.5rem; /* Slight padding for aesthetics */
    border: 1px solid #ced4da; /* Subtle border to define the box */
    border-radius: 0.25rem; /* Match Bootstrapâ€™s rounded corners */
    background-color: #fff; /* White background for readability */
    line-height: 1.5; /* Consistent line height */
}

/* Optional: Style the scrollbar for better look (Webkit browsers) */
.ticker-description::-webkit-scrollbar {
    width: 8px;
}

.ticker-description::-webkit-scrollbar-thumb {
    background-color: #adb5bd; /* Gray scrollbar */
    border-radius: 4px;
}

.ticker-description::-webkit-scrollbar-track {
    background-color: #f8f9fa; /* Light track */
}

/* Glass tab and industry button styles are in metrics_colors.css (shared) */

/* Card and table styles */
#eod-metrics,
#sector-metrics,
#indexed-metrics {
    background-color: rgb(229, 254, 234);
    border-left: 1px solid darkgreen;
    border-right: 1px solid darkgreen;
    border-bottom: 1px solid darkgreen;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

#results-display .card {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

#results-display .card.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
    opacity: 1;
}

.card-body {
    padding: 0 !important;
}

.table {
    margin-bottom: 0;
}

.card-margins {
    margin-left: auto;
    margin-right: auto;
}

/* Override Bootstrap col widths for wider cards on desktop */
@media (min-width: 992px) {
    #results-display .col-lg-6 {
        flex: 0 0 49%;
        max-width: 49%;
    }
}

#results-display .row {
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

#results-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
    #results-display {
        max-width: 100%;
        padding: 0.25rem;
        margin: 0;
    }
}

#results-display.bg-simple {
    background-color: #28a745;
}

#results-display.bg-percent {
    background-color: #007bff;
}

#results-display.bg-step {
    background-color: #6f42c1;
}

#results-display .card {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    /* Force cards to be full width, overriding Bootstrap col classes */
    #results-display .col-12,
    #results-display .col-md-6,
    #results-display .col-lg-6,
    #results-display .col-lg-4,
    #results-display [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100%;
        width: 100% !important;
    }

    #results-display .card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100%;
        width: 100% !important;
    }
}

/* Sticky table header */
.table-sticky-container {
    max-height: 640px;
    overflow-y: auto;
    position: relative;
}

.table-sticky-container .sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgb(229, 254, 234);
    border-bottom: 1px solid darkgreen;
}

.table-sticky-container .table {
    width: 100%;
    table-layout: auto;
}

/* Metric Tab Summary Styles */
#metric-tab-summary {
    margin: 0;
    padding: 0;
}

/* Control bar styles moved to metrics_colors.css for shared use */

/* Summary Stats */
#summary-stats .card {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border: none;
}

#summary-stats .card-header {
    background-color: rgb(229, 254, 234);
    border-bottom: 1px solid darkgreen;
}

#summary-stats .card-body {
    background-color: #e7f6ff;
    padding: 1rem !important;
}

#summary-stats .metric-item {
    margin: 1rem 0;
    padding: 0;
}

#metric-tab-summary .card {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border: none;
}

#metric-tab-summary .card-header {
    background-color: rgb(229, 254, 234);
    border-bottom: 1px solid darkgreen;
}

#metric-tab-summary .card-body {
    background-color: #e7f6ff;
    padding: 1rem !important;
}

#metric-tab-summary .metric-item {
    background-color: #e7f6ff;
    border: 1px solid #28a745;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 0.25rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
}

.ticker-link {
    color: #000000;
    text-decoration: none;
}

.ticker-link:hover {
    color: #333333;
    text-decoration: underline;
}

/* Ticker links with industry color classes should use industry colors */
a.ticker-link[class*="-"] {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

a.ticker-link[class*="-"]:hover {
    filter: brightness(85%);
    text-decoration: none;
}

/* Accordion text */
.collapse .card-body {
    background-color: #ffffff;
    color: #000000;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Full width everything */
    html {
        width: 100%;
        overflow-x: hidden;
    }

    /* Remove body and container padding on mobile */
    body {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0;
        overflow-x: hidden;
        width: 100%;
    }

    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    /* Full width container */
    .sticky-nav {
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #metric-tab-summary {
        width: 100%;
        margin: 0;
        padding: 0 !important;
    }

    /* Control bar responsive styles moved to metrics_colors.css */

    /* Smaller badges and form controls */
    .form-check-inline {
        font-size: 0.85rem;
        margin: 0.2rem;
        padding: 4px 6px;
    }

    .form-check-label {
        font-size: 0.85rem !important;
    }

    #pulse-seconds {
        width: 50px !important;
    }

    /* Adjust sticky nav position */
    .sticky-nav {
        top: 0;
    }

    /* Reduce table container height for mobile */
    .table-sticky-container {
        max-height: 400px;
    }

    /* Smaller metric items */
    #metric-tab-summary .metric-item {
        font-size: 0.9rem;
        padding: 0.4rem 0.7rem;
        margin: 0.15rem;
    }

    /* Full width cards on mobile */
    #results-display .card {
        margin: 0.25rem 0;
    }

    /* Remove card margins on mobile for full width */
    .card-margins {
        margin-left: 0;
        margin-right: 0;
    }

    /* Full width tables */
    .table-sticky-container {
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    /* Control bar 480px styles moved to metrics_colors.css */

    .form-check-inline {
        font-size: 0.75rem;
    }
}


/* Legend table styles moved to metrics_colors.css for global access */