﻿:root {
    --eclipse-mutedblue: #596D95;
    --eclipse-orange: #ED6920;
    --eclipse-lightblue: #d45a1a; /* Lighter version for table headers */
    --eclipse-white: #ffffff;
}

/* Eclipse Brand Header Styling */
.custom-header {
    background: linear-gradient(135deg, var(--eclipse-mutedblue) 0%, #4a5d85 50%, #3b4f75 100%);
    padding: 1rem; /* Reduced from 1.5rem */
    border-radius: 0; /* Removed rounded corners */
    box-shadow: 0 4px 15px rgba(89, 109, 149, 0.2);
    border: 1px solid rgba(89, 109, 149, 0.3);
}

.custom-icon {
    color: var(--eclipse-orange);
    text-shadow: 0 0 10px rgba(237, 105, 32, 0.3);
}

.custom-title {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 1.75rem; /* Slightly smaller than default h2 */
}

.custom-subtitle {
    color: #ffffff !important;
    opacity: 0.9;
    font-size: 0.85rem; /* Slightly smaller */
}

.custom-btn-primary {
    background: linear-gradient(135deg, var(--eclipse-orange) 0%, #d45a1a 100%);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem; /* Reduced padding */
    border-radius: 0; /* Removed rounded corners */
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(237, 105, 32, 0.2);
}

    .custom-btn-primary:hover {
        background: linear-gradient(135deg, #d45a1a 0%, #c14e15 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(237, 105, 32, 0.3);
        color: #ffffff;
    }

    .custom-btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(237, 105, 32, 0.2);
    }

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .custom-header {
        padding: 0.75rem; /* Even smaller on mobile */
    }

        .custom-header .d-flex.justify-content-between {
            flex-direction: column;
            gap: 0.75rem; /* Reduced gap */
        }

    .custom-icon {
        font-size: 2rem !important; /* Smaller icon on mobile */
    }

    .custom-title {
        font-size: 1.5rem; /* Smaller title on mobile */
    }
}

/* Remove rounded corners from all cards */
.card {
    border-radius: 0 !important;
}

.card-header {
    border-radius: 0 !important;
}

.card-body {
    border-radius: 0 !important;
}

/* Alternative: If you prefer a lighter header background */
.custom-header-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--eclipse-mutedblue);
}

    .custom-header-light .custom-title {
        color: var(--eclipse-mutedblue);
        font-weight: 600;
        text-shadow: none;
    }

    .custom-header-light .custom-subtitle {
        color: #6c757d !important;
        font-size: 0.95rem;
    }

@media print {
    /* Hide navigation and other UI elements */
    nav, .navbar, .nav, .navigation, .sidebar, .header, .footer, .btn, .no-print, .page-break {
        display: none !important;
    }

    /* Hide the casino filter dropdown */
    /*.row:has(#casinoFilter) {
        display: none !important;
    }*/

    /* Or target it more specifically */
    /*.row .card:has(#casinoFilter) {
        display: none !important;
    }*/

    /* Optimize for print */
    body {
        -webkit-print-color-adjust: exact;
        margin: 0;
        padding: 10px;
    }

    /* Preserve your card styling but remove shadows */
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        /* Keep your existing card structure */
    }

    /* Preserve your market performance card structure */
    .market-performance-card {
        height: auto !important; /* Allow natural height for print */
        min-height: auto !important;
    }

    

    .market-performance-card .card-body {
        padding: 15px !important; /* Restore some padding for print */
        height: auto !important; /* Allow natural height */
        display: block !important; /* Change from flex to block for print */
        overflow: visible !important;
    }

    .market-performance-table-container {
        flex: none !important;
        overflow: visible !important;
        width: 100%;
        min-height: auto !important;
    }

    /* Preserve your table styling but adjust for print */
    .market-performance-table {
        width: 100% !important;
        margin-bottom: 0;
        font-size: 12px !important; /* Slightly smaller for print */
    }

    .market-performance-table thead th {
        position: static !important; /* Remove sticky positioning for print */
        background-color: var(--eclipse-lightblue) !important;
        color: white !important;
        z-index: auto !important;
        -webkit-print-color-adjust: exact;
    }

    .market-performance-table th:not(:first-child),
    .market-performance-table td:not(:first-child) {
        width: 8.75%;
    }

    .market-performance-table th,
    .market-performance-table td {
        font-size: 14.4px !important; /* Smaller font for print */
        padding: 6px !important; /* Slightly less padding */
    }

    /* Preserve sortable styling but remove hover effects */
    .sortable::after {
        content: ' ↕️';
        font-size: 0.8em;
        opacity: 0.5;
    }

    .sortable.asc::after {
        content: ' ↑';
        opacity: 1;
    }

    .sortable.desc::after {
        content: ' ↓';
        opacity: 1;
    }

    .sortable:hover {
        background-color: transparent !important; /* Remove hover effects for print */
    }

    /* Ensure full width usage */
    .container, .container-fluid {
        max-width: none !important;
        padding: 0 !important;
    }

    /* Hide the page header or modify it */
    .page-header {
        margin-bottom: 10px !important;
    }

        /* Optional: Hide the icons in headers */
        .page-header i {
            display: none !important;
        }

    /* Ensure colors print correctly */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Force page breaks between tables if needed */
    .market-performance-card:first-of-type {
        page-break-after: avoid;
    }

    .market-performance-card:last-of-type {
        page-break-before: avoid;
    }
}
/* END OF PDF FORMATTING*/

/* Your existing styles remain unchanged below this line */
.card-fixed-size {
    height: 100px;
    width: 100%;
}

    .card-fixed-size .card-body {
        height: calc(100% - 60px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .card-fixed-size .card-body.kpi-body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 20px;
            height: calc(100% - 10px);
        }

    .kpi-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        width: 100%;
    }

    .kpi-row:last-child {
        margin-bottom: 0;
    }

.kpi-label {
    font-size: 1.2rem;
    font-weight: 400;
    text-align: left;
    flex: 1;
}

.kpi-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--eclipse-orange);
    text-align: right;
    flex: 1;
}

.wpupd-display {
    padding: 20px 0;
}

.wpupd-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--eclipse-orange);
    margin-bottom: 10px;
}

.wpupd-label {
    font-size: 0.5rem;
    color: #666;
    margin-bottom: 15px;
}

.card-fixed-size .card-body:not(.kpi-body) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-select {
    max-width: 300px;
    border-color: var(--eclipse-mutedblue);
}

    .form-select:focus {
        border-color: var(--eclipse-orange);
        box-shadow: 0 0 0 0.2rem rgba(237, 105, 32, 0.25);
    }

#egmDataTable, #marketSummaryTable, #gameSummaryTable {
    font-size: 0.9rem;
}

    #egmDataTable th, #marketSummaryTable th, #gameSummaryTable th {
        white-space: nowrap;
        font-weight: 600;
        background-color: var(--eclipse-mutedblue) !important;
        color: white;
    }

    #egmDataTable td, #marketSummaryTable td, #gameSummaryTable td {
        white-space: nowrap;
    }

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

.currency {
    text-align: right;
    font-weight: 500;
}

.number {
    text-align: right;
    font-weight: 500;
}

#trendChart {
    max-height: 400px;
}

#forecastTrendChart {
    max-height: 400px !important;
    height: 400px !important;
}

#forecastTrendChart-container {
    height: 400px;
    max-height: 400px;
    overflow: hidden;
}

.chart-container {
    position: relative;
    height: 400px;
    max-height: 400px;
    overflow: hidden;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .custom-header {
        padding: 1rem;
    }

        .custom-header .d-flex.justify-content-between {
            flex-direction: column;
            gap: 1rem;
        }

    .custom-icon {
        font-size: 2.5rem !important;
    }

    .custom-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .market-performance-table .mobile-hide {
        display: none !important;
    }

    .market-performance-table th:nth-child(1),
    .market-performance-table td:nth-child(1) {
        width: 40%;
    }

    .market-performance-table th:nth-child(2),
    .market-performance-table td:nth-child(2),
    .market-performance-table th:nth-child(3),
    .market-performance-table td:nth-child(3),
    .market-performance-table th:nth-child(5),
    .market-performance-table td:nth-child(5) {
        width: 20%;
    }
}

.market-performance-card {
    height: fit-content;
    min-height: 150px;
    border: 1px solid rgba(89, 109, 149, 0.2);
}

    .market-performance-card .card-header {
        background-color: var(--eclipse-white);
        color: var(--eclipse-mutedblue);
        border-bottom: 1px solid rgba(89, 109, 149, 0.2);
    }

    .market-performance-card .card-body {
        padding: 0 !important;
        height: calc(100% - 60px);
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden;
    }

.market-performance-table-container {
    flex: 1;
    overflow: auto;
    width: 100%;
    min-height: 0;
}

.market-performance-table {
    width: 100% !important;
    margin-bottom: 0;
}

    .market-performance-table thead th {
        position: sticky;
        top: 0;
        background-color: var(--eclipse-mutedblue);
        color: white !important;
        z-index: 10;
    }

    .market-performance-table th:not(:first-child),
    .market-performance-table td:not(:first-child) {
        width: 8.75%;
    }

    .market-performance-table th,
    .market-performance-table td {
        font-size: 0.9rem;
        padding: 8px;
    }

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

    .sortable:hover {
        background-color: var(--eclipse-orange) !important;
        color: white !important;
    }

    .sortable::after {
        content: ' ↕️';
        font-size: 0.8em;
        opacity: 0.5;
    }

    .sortable.asc::after {
        content: ' ↑';
        opacity: 1;
        color: var(--eclipse-orange);
    }

    .sortable.desc::after {
        content: ' ↓';
        opacity: 1;
        color: var(--eclipse-orange);
    }

/* Add this to your CSS file to override any conflicting styles */

/* Force the green background for total row */
#summaryTable tfoot tr {
    background-color: #d4edda !important;
    color: #155724 !important;
}

/* Ensure the green stays in print mode too */
@media print {
    #summaryTable tfoot tr {
        background-color: #d4edda !important;
        color: #155724 !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}

/* Override any table row background colors that might be affecting the total row */
.market-performance-table tfoot tr {
    background-color: #d4edda !important;
}

.market-performance-table tfoot td {
    background-color: #d4edda !important;
    color: #155724 !important;
    font-weight: bold !important;
}

/* Make sure no hover effects apply to the total row */
#summaryTable tfoot tr:hover {
    background-color: #d4edda !important;
    color: #155724 !important;
}


/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-text {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--eclipse-mutedblue);
    font-weight: 500;
}

.loading-spinner-lg {
    width: 3rem;
    height: 3rem;
}

/* Casino Notes Styles */
.note-row-clickable {
    transition: background-color 0.2s ease;
}

    .note-row-clickable:hover {
        background-color: #f8f9fa !important;
    }

.note-chevron {
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 0.9em;
}

.note-detail-row td {
    padding: 0 !important;
}

.note-detail-row.show td {
    padding: 15px 20px !important;
}

.note-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add top margin to casino notes table */
#casinoNotesTable {
    margin-top: 30px !important;
}

/* Casino Notes Styles */
.note-row-clickable {
    transition: background-color 0.2s ease;
}

    .note-row-clickable:hover {
        background-color: #f8f9fa !important;
    }

.note-chevron {
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 0.9em;
}

.note-detail-row td {
    padding: 0 !important;
}

.note-detail-row.show td {
    padding: 15px 20px !important;
}

.note-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add top margin to casino notes table */
#casinoNotesTable {
    margin-top: 30px !important;
}

/* Modal styles */
#addNoteModal .modal-body {
    padding: 20px;
}

#noteText {
    resize: vertical;
    min-height: 150px;
}

#noteCharCount {
    font-weight: bold;
}
