/* styles.css */

/* General styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    justify-content: center;
}

/* Main container styles */
.main-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

/* Panel styles */
.left-panel, .right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Form styles */
form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

input[type=date],
input[type=time],
input[type=datetime-local],
input[type=text],
input[type=number],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff;
    color: #475569;
    transition: all 0.2s ease;
}

input[type=date]:hover,
input[type=time]:hover,
input[type=datetime-local]:hover,
input[type=text]:hover,
input[type=number]:hover,
select:hover {
    border-color: #cbd5e1;
}

input[type=date]:focus,
input[type=time]:focus,
input[type=datetime-local]:focus,
input[type=text]:focus,
input[type=number]:focus,
select:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
}

input[type=submit],
button {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background-color: #64748b;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input[type=submit]:hover,
button:hover {
    background-color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

input[type=submit]:active,
button:active {
    transform: translateY(0);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid black;
}

th, td {
    padding: 8px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background-color: #007bff;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Stat box styles */
/* Stat box styles */
.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 calc(30% - 20px);
    box-sizing: border-box;
    width: 250px;
    height: 150px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin: 10px;
    padding-top: 20px;
    padding-left: 10px;
    padding-right: 10px;
    position: relative; /* For absolute positioning of percent-change */
    padding-bottom: 10px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.stat-box:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-box label {
    font-size: 1.1em;
    font-weight: bold;
    color: #000000;
    margin: 0;
    display: block;
    flex-shrink: 0;
}

.stat-box .subtitle {
    font-size: 0.8em;
    font-weight: normal;
    color: #888;
    margin: 2px 0 0 0;
    display: block;
    flex-shrink: 0;
}

.value {
    font-size: 1.8em;
    font-weight: bold;
    color: #000000;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 16px;
    margin-bottom: 20px;
    flex-shrink: 0;
    width: 100%;
    min-height: 60px;
    padding-bottom: 8px;
}

.value-number {
    display: inline-block;
    text-align: center;
    line-height: 1.2;
}

/* Split value layout for organic/paid breakdown */
.value-split {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 6px;
    width: 100%;
}

.split-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.split-value {
    font-size: 1.6em;
    font-weight: bold;
    color: #333;
}

.split-label {
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
}

.split-divider {
    width: 1px;
    height: 50px;
    background-color: #ccc;
}

.stat-loader {
    margin-top: 16px;
    margin-bottom: auto;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #64748b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: spin 0.8s linear infinite;
}

/* Specific loaders for downloads/trials boxes */
.loadingIndicatorDownloads,
.loadingIndicatorTrials, 
.loadingIndicatorConversion {
    margin-top: 16px;
    margin-bottom: auto;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #64748b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    animation: spin 0.8s linear infinite;
}

.percent-change {
    font-size: 0.9em;
    font-weight: 600;
    position: absolute;
    bottom: -8px;
    right: 15px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
    text-align: right;
    z-index: 1;
}

.percent-change.up {
    color: #22c55e;
    opacity: 100%;
}

.percent-change.down {
    color: #ef4444;
    opacity: 100%;
}

.percent-change.no-change {
    color: rgb(201, 108, 2);
    opacity: 100%;
}

.percent-change::before {
    content: attr(data-arrow);  /* Use the data-arrow attribute for the arrow */
    margin-right: 0px;  /* Space between the arrow and the percentage value */
}


.percent-change::after {
    content: attr(data-tooltip); /* Use the data-tooltip attribute for additional information */
    visibility: hidden;
    opacity: 0;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    top: 50%; /* Position the tooltip vertically centered */
    left: 100%; /* Position the tooltip to the right of the element */
    margin-left: 30px; /* Add some space between the element and the tooltip */
    transform: translateY(-50%); /* Center the tooltip vertically */
    transition: opacity 0.3s;
    font-size: 0.7em; /* Smaller font size for tooltip */
}

.percent-change:hover::after {
    visibility: visible;
    opacity: 1;
}

/* Chart Position Corner Styles */
.chart-position-corner {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
}

.chart-position-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 160px;
    height: 100px;
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chart-position-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.chart-position-box label {
    font-size: 0.9em;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 2px;
    margin-top: -5px;
    display: block;
}

.chart-position-box .value {
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 2px;
}

.chart-position-box .info-button {
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    font-size: 12px;
}

/* Top stats container with border */
.top-stats-container {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.time-period-selector {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.time-period-selector label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.time-period-selector select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

/* Stats Row Layouts */
.stats-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 0;
}

.top-stats-container .stat-box {
    margin: 0;
}

.stats-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 0 12.5%;
}

/* Toggle box container styles */
.toggle-box-container {
    display: grid; /* Initially hidden */
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.toggle-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background-color: #64748b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    width: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-button:hover {
    background-color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.loader {
    margin: 40px auto;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #64748b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

.stat-chart-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chart-toggle {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.toggle-buttons2-container {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.toggle-button2 {
    padding: 10px 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.toggle-button2:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.toggle-button2.active {
    background-color: #64748b;
    color: white;
    border-color: #64748b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


.chart-type-box {
    padding: 10px 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.chart-type-box:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.chart-type-box.selected {
    background-color: #64748b;
    color: white;
    border-color: #64748b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Chart component - combined container */
.chart-component {
    width: 70%;
    max-width: 70%;
    margin: 20px auto;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.chart-form {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.chart-content {
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-component .loader {
    margin: 40px auto;
}

/* Legacy chart-container for compatibility */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

canvas {
    width: auto !important;
    max-height: 650px; /* Adjust the max-height as needed */
}

/* Single stat chart form styles */
#single-chart-form,
.chart-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

#single-chart-form .form-field,
.chart-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#single-chart-form .form-field label,
.chart-form .form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
}

#single-chart-form .update-button,
.chart-form .update-button {
    white-space: nowrap;
    padding: 10px 24px;
}


/* Comprehensive stat chart form styles */
#comprehensive-chart-form {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: space-between;
    align-items: flex-start;
    width: auto;
    max-width: 700px;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 10px 10px 10px rgba(0,0,0,0.1);
    border-radius: 20px;
    background-color: #f9f9f9;
}

#comprehensive-chart-form label {
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0;
}


#comprehensive-chart-form select,
#comprehensive-chart-form input {
    margin-top: 2px;
    font-size: 0.9em;
    width: auto;
    padding: 5px;
    text-align: left;
}

.controls {
    width: 70%;
    max-width: 70%;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 20px auto;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}


.controls.border-box .statistics-selection,
.controls.border-box .controls-right {
    flex: 1;
    min-width: 45%; /* Ensure two-column layout */
}

.statistics-selection {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Add some spacing between elements */
}

.controls-right {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.controls.border-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.checkbox-group {
    display: flex;
    font-size: 0.8em;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group div {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    margin-right: 10px;
}

.controls-right {
    display: flex;
    flex-direction: column;
}


#comprehensive-chart-form .update-button {
    align-self: center;
    justify-self: center;
    width: auto;
    padding: 10px 20px;
    margin: 20px auto 0;  /* Center horizontally and add top margin */
    display: block;  /* Ensure the button is displayed as a block element */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .customer-info span {
        display: none;
    }
}

@media (max-width: 675px) {
    html, body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden; /* Prevent horizontal scrolling */
        box-sizing: border-box;
    }

    .main-container {
        display: flex;
        flex-direction: column;
        max-width: 100%;
        margin: 0px;
        padding: 0px;
    }

    .left-panel, .right-panel > * {
        max-width: 100%;
        flex: 1 1 100%;
        margin: 5px auto;
        box-sizing: border-box;
    }

    .stats-row-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stats-row-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }

    .chart-position-corner {
        position: static;
        width: 100%;
        margin-bottom: 15px;
        display: flex;
        justify-content: center;
    }

    .chart-position-box {
        width: 200px;
        height: 80px;
    }

    .toggle-box-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .toggle-button {
        width: 25%;
    }

    .loader {
        margin: 20px auto;
        border: 3px solid #e2e8f0;
        border-top: 3px solid #64748b;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        animation: spin 0.8s linear infinite;
    }

    .chart-component {
        width: 90%;
        max-width: 90%;
    }

    .controls {
        width: 90%;
        max-width: 90%;
    }

    #single-chart-form,
    .chart-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #single-chart-form .update-button,
    .chart-form .update-button {
        justify-self: center;
    }

    .controls-right {
        align-items: center;
    }

    .stat-box .percent-change {
        display: none;
    }

    .stat-box .value {
        font-size: 1.2em;
    }
}

@media (max-width: 450px) {
    .stat-box {
        flex: 1 1 calc(50% - 10px); /* Adjust flex basis to 50% for two columns */
        max-width: calc(50% - 10px); /* Adjust max-width to 50% for two columns */
        margin: 5px; /* Add margin to ensure spacing around each box */
        gap: 5px;
    }

    .stats-row-3,
    .stats-row-2 {
        grid-template-columns: 1fr; /* Single column for very small screens */
        gap: 5px;
    }
    
    .top-stats-container {
        padding: 15px;
    }

    .toggle-box-container {
        display: grid; /* Use grid layout */
        grid-template-columns: repeat(2, 1fr); /* Ensure two columns */
        gap: 0px; /* Gap between items */
        justify-items: center; /* Center the grid items */
        width: 100%;
        margin-top: 20px;
    }
    .stat-box .value {
        font-size: 0.9em;
    }
}

/* Info button styles */
.info-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #94a3b8;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.info-button:hover {
    background-color: #64748b;
    transform: scale(1.05);
}

/* Elevate stat-box when info-button is hovered so tooltip appears above siblings */
.stat-box:has(.info-button:hover) {
    z-index: 100;
}

.info-button::after {
    content: attr(data-tooltip); /* Use the data-tooltip attribute for additional information */
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 9999;
    top: 50%; /* Position the tooltip vertically centered */
    left: 100%; /* Position the tooltip to the right of the element */
    margin-left: 10px; /* Add some space between the element and the tooltip */
    transform: translateY(-50%); /* Center the tooltip vertically */
    transition: opacity 0.3s;
    font-size: 0.9em; /* Smaller font size for tooltip */
}

.info-button:hover::after {
    opacity: 1;
    visibility: visible;
}

/* STYLING FOR CUSTOMERS.HTML */
.sidebar {
    width: 200px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
}

.sidebar button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.sidebar button:hover {
    background-color: #0056b3;
}

/* Style for the main content */
.main-content {
    flex-grow: 1;
    margin-left: 20px;
}

.main-content h1 {
    margin-top: 0;
}

.pagination {
    display: flex;
    justify-content: left;
    align-items: center;
    margin: 20px 0;
}

.pagination button {
    padding: 10px 20px;
    margin: 0 5px;
    font-size: 11px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    max-width: 80px;
}

.pagination button:hover {
    background-color: #0056b3;
}

.mini-loader {
    display: inline-block;
    margin-left: 10px;
}

.mini-loader .loader {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #64748b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style for the search bar */
.search-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.search-bar input {
    padding: 10px;
    font-size: 16px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.user-grid-container {
    border: 1px solid #000000;
    box-shadow: 10px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    background-color: #fff; /* Ensure background color is white */
}

/* Style for the user grid */
.user-grid {
    width: 100%;
    border-collapse: collapse;
    cursor: pointer;
}

.user-grid-header, .user-grid-row {
    display: flex;
    background-color: #f1f1f1;
    border-bottom: 1px solid #000000;
}

.user-grid-header {
    background-color: #007bff;
    color: white;
}

.user-grid-row:nth-child(even) {
    background-color: #f9f9f9;
}

.user-grid div {
    flex: 1;
    text-align: center;
    padding: 10px 0;
}

/* Style for customer info column */
.customer-info {
    display: flex;
    align-items: center;
}

.customer-info img {
    width: 30px;
    height: auto;
    margin-right: 10px;
    margin-left: 15px;
    vertical-align: middle; /* Align the icon vertically with the text */
}

/* Style for status container */
.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-text {
    font-size: 14px;
}

.status-dot.subscriber {
    background-color: green;
}

.status-dot.trial {
    background-color: orange;
}

.status-dot.cancelled {
    background-color: red;
}

/* Style for status icons */
.status-icon {
    font-size: 1.2em;
    vertical-align: middle;
}

.checkmark {
    color: green;
}

.cross {
    color: red;
}

.mini-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mini-container select{
    width: 100%;
}

.trial-revenue-checkbox {
    display: flex;
    font-size: 14px;
    font-weight: normal;
    align-items: center;
    gap: 8px;
    position: relative;
}

.trial-revenue-info-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px; /* Add space between the label and the button */
    margin-bottom: 10px;
}

.trial-revenue-info-button::after {
    content: attr(data-tooltip); /* Use the data-tooltip attribute for additional information */
    visibility: hidden;
    opacity: 0;
    width: 180px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    top: 50%; /* Align the tooltip vertically with the button */
    left: 105%; /* Position the tooltip to the right of the button */
    margin-top: -16px; /* Center the tooltip vertically */
    transition: opacity 0.3s;
    font-size: 0.8em; /* Smaller font size for tooltip */
}

.trial-revenue-info-button:hover::after {
    opacity: 1;
    visibility: visible;
}

.chartjs-render-monitor {
    margin-bottom: 30px;
    margin-top: 30px;
}

/* Downloads organic/non-organic split styling */
.downloads-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    margin-bottom: auto;
    flex-shrink: 0;
    width: 100%;
}

.downloads-stats-box {
    background-color: transparent;
    border-radius: 4px;
    padding: 5px;
    width: 48%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.downloads-stats-box .downloads-value {
    font-size: 1.4em;
    margin-bottom: 2px;
    font-weight: bold;
    color: #000000;
}

.downloads-stats-box .downloads-label {
    margin-bottom: 0;
    font-size: 0.7em;
    color: #888;
    font-weight: normal;
}

.downloads-stats-divider {
    display: flex;
    align-items: center;
    position: relative;
    width: 1px;
    height: 50px;
    background-color: #ccc;
    margin: 0 5px;
}

/* Cache Status Footer */
.cache-status-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.9);
    color: #888;
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.cache-status-footer .cache-indicator {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.cache-status-footer .cache-indicator.fresh {
    color: #4ade80;
}

.cache-status-footer .cache-indicator.stale {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.cache-status-footer .cache-info {
    color: #9ca3af;
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    min-width: 60px;
    display: inline-block;
}

.skeleton * {
    visibility: hidden;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.stat-box .value.skeleton {
    min-height: 32px;
    min-width: 80px;
}

.downloads-value.skeleton {
    min-height: 24px;
    min-width: 40px;
}

/* Fade in animation when data loads */
.loaded {
    animation: fadeIn 0.2s ease-in;
}

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