/* Sticky column cell with proper z-index to prevent disappearing text */
.sticky-col-cell {
    position: sticky !important;
    left: 0 !important;
    z-index: 80 !important;
    background: #1e293b !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Also make sticky-col work - THIS IS THE KEY FOR TD ELEMENTS */
.sticky-col {
    position: sticky !important;
    left: 0 !important;
    z-index: 80 !important;
    background: #1e293b !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Asset cell TD element - ensure center alignment */
.asset-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Asset Cell - Vertical layout: Name on top, flags below - CENTER ALIGNED */
.asset-cell-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem;
    justify-content: center !important;
    font-weight: 700;
    color: white;
    padding: 1rem 0.5rem;
    text-align: center !important;
    margin: 0 auto !important;
}

/* Asset name styling - bigger and bold */
.asset-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: white;
    line-height: 1.2;
    text-align: center !important;
}

/* Flag pair - horizontal layout below asset name */
.flag-pair {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px;
    align-items: center !important;
    justify-content: center !important;
}

.flag-pair img,
.flag-img {
    width: 30px;
    height: 20px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Asset icon wrapper for non-flag assets */
.asset-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
}

.gold-icon,
.btc-icon,
.us500-icon,
.us30-icon,
.oil-icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.gold-icon svg,
.btc-icon img,
.us500-icon svg,
.us30-icon svg,
.oil-icon svg {
    width: 36px;
    height: 36px;
}

/* Mobile fixes for navigation buttons and modals */
@media (max-width: 768px) {

    /* Center the entire header section on mobile */
    .section > .container-fluid > div[style*="display: flex"] {
        justify-content: center !important;
    }

    /* Center guide and live signal buttons container */
    div[style*="display: flex; gap: 1rem; justify-content: center"] {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Fix guide modal to be properly centered and sized on mobile */
    .modal-overlay {
        padding: 1rem !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .modal-overlay .glass-card {
        width: calc(100% - 2rem) !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }

    /* Ensure modal content is scrollable if needed */
    #guideModal .glass-card,
    #signalModal .glass-card {
        max-height: calc(100vh - 2rem) !important;
    }

    /* Fix navigation container to prevent overflow */
    .glass-card {
        padding: 0.5rem 0.25rem !important;
        margin-left: 0.25rem;
        margin-right: 0.25rem;
        gap: 0.5rem !important;
    }

    /* Adjust button sizes and spacing */
    .btn.btn-glass {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem;
        min-width: 36px;
    }

    /* Navigation button icons */
    .btn.btn-glass i {
        font-size: 0.9rem;
    }

    /* Make date text much smaller to fit all buttons */
    .text-center {
        min-width: 140px !important;
    }

    .text-muted {
        font-size: 0.65rem !important;
    }

    /* Reduce date range text size significantly */
    .text-center span[style*="font-weight"] {
        font-size: 0.75rem !important;
    }

    /* Ensure asset column remains readable on mobile */
    .asset-name {
        font-size: 1rem;
    }

    .flag-pair img,
    .flag-img {
        width: 24px;
        height: 16px;
    }

    .sticky-col,
    .sticky-col-cell,
    .asset-cell {
        min-width: 100px !important;
    }
}
