.llw-ga-report-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 15px;
    background-color: #f6f7f7;
    border-radius: 4px;
    border: 1px solid #ccd0d4;
}

.llw-ga-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-top:20px;
}

.llw-ga-header h2 {
    margin: 0;
}

.llw-ga-date-toggle {
    position: relative;
    display: inline-flex;
    background: #1f2937;
    border-radius: 999px;
    height: 43px;
    padding: 0px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}
.llw-ga-date-toggle button, .llw-ga-date-toggle button:focus {
    position: relative;
    z-index: 2;
    padding: 12px 24px;
    border: none;
    background: transparent !important;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    min-width: 100px;
}
.llw-ga-metrics-container {
    display:grid;
    grid-template-columns:33% 33% 33%;
}
.llw-ga-metric-value {
    font-weight:700;
    font-size:20px;
}
.llw-ga-date-toggle button:hover {
    color: #d1d5db;
}
.llw-ga-date-toggle button.active, .llw-ga-date-toggle button.active:hover {
    color: #fff;
    font-weight: 600;
    cursor:default;
}
.llw-ga-date-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: 36px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    z-index: 1;
}
.llw-ga-date-toggle button:hover {
    border:none;
}
.llw-ga-date-toggle:has(button[data-period="365"].active)::before {
    transform: translateX(100%);
}
.llw-ga-date-toggle:hover {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.llw-ga-tabs {
    border-bottom: 2px solid #ccd0d4;
    margin-bottom: 20px;
}

.llw-ga-tab-button { margin-right:5px;border:none;background-color:#06B0FD;color:white;font-weight:700;border-radius:20px 20px 0 0; }
.llw-ga-tab-button:not(.active):hover { background-color:#1F2A33dd;}
.llw-ga-tab-button.active { background-color:#1F2A33; }

.llw-ga-tab-content {
    display: none;
}

.llw-ga-tab-content.active {
    display: block;
}

.llw-ga-report-container h3 {
    border-bottom: 2px solid #2271b1;
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.llw-ga-report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.llw-ga-report-table th,
.llw-ga-report-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.llw-ga-report-table thead th {
    background-color: #f1f1f1;
    font-weight: 600;
}

.llw-ga-report-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
.llw-ga-chart-container {
    position: relative; /* Required by Chart.js for tooltips and responsiveness */
    height: 400px; /* A sensible, fixed height for the chart */
    width: 100%;
    margin-top: 40px;
}
/* --- New Popup Styles --- */
.llw-ga-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.llw-ga-popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.llw-ga-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    cursor: pointer;
    background: none;
    border: none;
}
.llw-ga-popup-close:hover {
    color: #000;
    background: none;
}
/* --- New Loader Styles --- */
.llw-ga-loader-container {
    position: relative;
    min-height: 400px; /* Give it some height while loading */
    display: flex;
    align-items: center;
    justify-content: center;
}

.llw-ga-report-container.loading .llw-ga-loader-container {
    opacity: 0.5; /* Dim content while reloading */
}

.llw-ga-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2271b1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: llw-spin 1s linear infinite;
}

@keyframes llw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* --- New Heatmap Styles --- */
#llw-ga-heatmap-chart {
    width: 100%;
    height: 400px; /* Or adjust as needed */
    margin-bottom: 30px;
}
/* --- Content Loading Styles --- */
.llw-ga-content-wrapper {
    position: relative; /* Required for the overlay */
}

.llw-ga-content-wrapper.llw-ga-content-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(246, 247, 247, 0.75); /* Overlay color matching the background */
    z-index: 10;
    -webkit-backdrop-filter: blur(2px); /* Optional: nice blur effect */
    backdrop-filter: blur(2px);
}
