::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

::-webkit-scrollbar-thumb:active {
    background: #333;
}

.caa-widget-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 20px auto;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf0;
    transition: all 0.2s ease;
}

.caa-widget-container h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a2a3a;
    margin: 0 0 6px 0;
    padding: 0;
    letter-spacing: -0.3px;
}

.caa-widget-container .last-updated {
    font-size: 13px;
    color: #6b7a8a;
    margin: 0 0 16px 0;
    padding: 0;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 12px;
}

.caa-widget-container .last-updated span {
    font-weight: 600;
    color: #2c3e50;
}

.caa-widget-container .last-updated .server-time {
    font-weight: 400;
    color: #6b7a8a;
    font-size: 12px;
    margin-left: 8px;
}

.caa-widget-container .client-info {
    font-size: 12px;
    color: #8a9aa8;
    margin-top: -8px;
    margin-bottom: 12px;
}

/* Location list */
.caa-location-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-x: hidden;
}

.caa-location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 15px;
    color: #1a2a3a;
    transition: background 0.2s ease;
}

.caa-location-item:last-child {
    border-bottom: none;
}

.caa-location-item:hover {
    background: #f8faff;
    border-radius: 6px;
}

.caa-location-name {
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.caa-location-name .location-id {
    font-size: 11px;
    color: #a0b0be;
    font-weight: 400;
}

.caa-location-count {
    font-weight: 700;
    font-size: 18px;
    color: #0056a7;
    background: #eef4fa;
    padding: 2px 16px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
    font-variant-numeric: tabular-nums;
}

.caa-location-count.zero {
    color: #b22234;
    background: #fde8e8;
}

.caa-location-count.low {
    color: #d48c2b;
    background: #fef4e8;
}

.caa-location-count.high {
    color: #1e7e34;
    background: #e6f4ea;
}

.caa-scheduler-closed {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #856404;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.caa-scheduler-closed .icon {
    font-size: 20px;
}

.caa-divider {
    border: none;
    border-top: 1px dashed #dce1e7;
    margin: 16px 0 12px 0;
}

.caa-widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #8a9aa8;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.caa-widget-footer .refresh-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.caa-widget-footer .refresh-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    transition: all 0.3s ease;
}

.caa-widget-footer .refresh-indicator.loading {
    background: #ff9800;
    animation: pulse 1s infinite;
}

.caa-widget-footer .refresh-indicator.error {
    background: #f44336;
}

.caa-widget-footer .refresh-indicator.idle {
    background: #4caf50;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.caa-powered-by {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #a0b0be;
}

.caa-powered-by a {
    color: #0056a7;
    text-decoration: none;
    font-weight: 500;
}

.caa-powered-by a:hover {
    text-decoration: underline;
}

.caa-loading {
    text-align: center;
    padding: 30px 0;
    color: #6b7a8a;
}

.caa-loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e8ecf0;
    border-top-color: #0056a7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.caa-error {
    text-align: center;
    padding: 20px;
    color: #b22234;
    background: #fde8e8;
    border-radius: 8px;
    font-size: 14px;
}

.caa-error .retry-btn {
    margin-top: 10px;
    padding: 6px 18px;
    background: #b22234;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.caa-error .retry-btn:hover {
    background: #8b1a1a;
}

.caa-stats-summary {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #6b7a8a;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    flex-wrap: wrap;
}

.caa-stats-summary .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.caa-stats-summary .stat-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.caa-stats-summary .stat-dot.green {
    background: #1e7e34;
}

.caa-stats-summary .stat-dot.yellow {
    background: #d48c2b;
}

.caa-stats-summary .stat-dot.red {
    background: #b22234;
}

@media (max-width: 480px) {
    .caa-widget-container {
        padding: 16px 18px;
        margin: 12px 10px;
    }

    .caa-widget-container h2 {
        font-size: 19px;
    }

    .caa-location-item {
        font-size: 14px;
        padding: 8px 0;
    }

    .caa-location-count {
        font-size: 16px;
        min-width: 32px;
        padding: 1px 12px;
    }

    .caa-stats-summary {
        gap: 12px;
        font-size: 11px;
    }

    .caa-widget-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}