/* Desktop-specific styles for Index page */

@media (min-width: 769px) {
    .rz-background-color-base-100 {
        background-color: #ffffff !important;
    }

    /* Flexbox container for the row */
    .row {
        display: flex; /* Ensure items are placed in a row */
        align-items: center; /* Vertically center the elements */
        justify-content: space-between; /* Space out the elements (left and right alignment) */
    }

    .header-row {
        display: flex; /* Ensure items are placed in a row */
        align-items: center; /* Vertically center the elements */
        justify-content: space-between; /* Space out the elements (left and right alignment) */
        width: 100%;
    }

    /* Title styling */
    .overview-title {
        margin: 0; /* Remove any default margin */
        font-size: 24px;
        font-weight: bold;
    }

    .section-title {
        margin: 0;
        font-size: 20px;
        font-weight: bold;
    }

    /* Switch container styling */
    .custom-daily-switch-container {
        padding-left: 85%; /* Align the switch to the right */
    }

    /* Ensure the full width of the page is utilized */
    .full-width {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Add higher specificity for row styles */
    .full-width .row {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .full-width .col-3, .full-width .col-6 {
        flex: 1 !important;
        padding: 0.5rem !important;
        box-sizing: border-box !important;
    }

    /* Ensure RadzenCard spans full width */
    .full-width .rounded-card {
        border-radius: 12px !important;
        width: 100% !important;
    }

    /* Remove any body margins or paddings */
    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Target only the specific element with id */
    .rz-body.d-flex {
        display: block !important;
    }
    
    .chart-card {
        height: 500px; /* Set a consistent height for both charts */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .chart-card .card-body {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .chart-card RadzenChart {
        flex-grow: 1;
        height: auto !important; /* Ensure the chart adjusts to fit the container */
    }

    /* Container for the switch */
    .custom-switch {
        position: relative;
        width: 160px;
        height: 40px;
        background-color: #f0f0f0; /* Light gray background */
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-family: Arial, sans-serif;
    }

    /* The track (light gray background) */
    .switch-track {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Individual options (Daily and Hourly) */
    .switch-option {
        position: relative;
        z-index: 2;
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: black;
        font-weight: normal;
        cursor: pointer;
        transition: font-weight 0.2s ease, color 0.2s ease;
    }

    /* Active (selected) option */
    .switch-option.active {
        font-weight: bold;
    }

    /* The moving bubble */
    .switch-bubble {
        position: absolute;
        top: 3px;
        left: 5px;
        width: 50%;
        height: 34px;
        background-color: white; /* Active bubble is white */
        border-radius: 17px;
        transition: transform 0.3s ease;
        z-index: 1;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Add these new styles */
    .header-container {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 1rem;
    }

    .header-text {
        flex: 1;
    }

    .dropdown-container {
        width: 120px;
        margin-right: 0.5rem;
        align-self: center;
        height: fit-content;
        display: flex;
        align-items: center;
    }

    /* Override Radzen dropdown styles if needed */
    ::deep .rz-dropdown {
        width: 100%;
        min-width: 120px;
    }

    ::deep .rz-dropdown-panel {
        min-width: 120px;
    }

    .filters-container {
        display: flex;
        gap: 0.5rem;
        align-items: flex-start;
        margin-left: auto;
        min-height: 60px
    }

    .reset-cache-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-container {
        width: 120px;
        margin-right: 0.5rem;
    }

    /* Set minimum width for the revenue type dropdown to accommodate "RevShare" */
    .dropdown-container:first-child {
        min-width: 100px;
        width: 100px;
    }

    /* Override Radzen dropdown styles if needed */
    ::deep .rz-dropdown {
        width: 100%;
    }

    ::deep .rz-dropdown-panel {
        min-width: 100px;
    }

    /* Add these styles to your existing styles */
    .charts-container {
        min-height: 300px;
        max-height: 500px;
        margin-bottom: 2rem;
        position: relative;
    }

    .chart-wrapper {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .chart-wrapper :deep(.rz-chart) {
        height: 100% !important;
    }

    /* Ensure proper spacing between charts section and data grid */
    .mt-5 {
        margin-top: 3rem !important;
    }

    /* New styles for when both charts should be shown */
    .charts-container.show-all {
        max-height: none;
        height: auto;
    }

    .charts-container.show-all .chart-wrapper {
        position: relative;
        height: 250px;  /* Half height for each chart when both are shown */
        margin-bottom: 1rem;
    }

    .export-button {
        min-width: 100px;
        height: 32px;
        transition: all 0.3s ease;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background-color: #4580FF !important;
    }

    .export-button:hover {
        background-color: #3B6DE6 !important;
        opacity: 0.9;
    }

    ::deep .export-button .rz-button-text {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .no-data-placeholder {
        text-align: center;
        padding: 40px;
        background-color: #f9f9f9;
        border-radius: 8px;
        width: 100%;
        max-width: 400px;
    }

    .no-data-icon {
        margin-bottom: 16px;
    }

    .no-data-title {
        font-size: 18px;
        color: #757575;
        margin-bottom: 8px;
    }

    .no-data-message {
        color: #9e9e9e;
        font-size: 14px;
    }

    .row.mt-4 {
        margin-top: 1.5rem !important;
    }

    .section-title {
        font-size: 1.75rem;
        font-weight: 500;
        margin-bottom: 1rem;
    }
}

