/* ===== Base Loading Styles ===== */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Single spin animation definition */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Error States ===== */
.error, .tab-error {
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 4px;
    margin: 10px 0;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.tab-error {
    background-color: #fff5f5;
    border-left: 4px solid #ff6b6b;
    color: #d63939;
}

/* ===== Tab System Styles ===== */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 15px 0;
    padding: 0 5px;
}

/* Loading containers */
.tabcontent.loading,
.tab-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.tabcontent.loading::after {
    content: "Loading...";
    color: #666;
}

.tab-loading-text {
    margin-top: 15px;
    color: #666;
    font-size: 16px;
}

/* ===== Button Styles ===== */
.refresh-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    color: #0056b3;
    background-color: #f0f7ff;
}

.refresh-btn:active {
    transform: scale(0.95);
}

/* Loading button states */
.button.loading,
.refresh-btn.loading {
    position: relative;
    pointer-events: none;
    color: #666;
}

.button.loading::after,
.refresh-btn.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(0,123,255,0.3);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Tab error specific buttons */
.tab-error .refresh-btn {
    color: #d63939;
}

.tab-error .refresh-btn:hover {
    background-color: #ffebeb;
}
.rate-limit-error {
    background: #f8d7da;
    border: 1px solid #ffcccc;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
}

.rate-limit-error h3 {
    color: #d9534f;
    margin-top: 0; 
    margin-bottom: 15px;
}

.countdown {
    font-size: 1.2em;
    font-weight: bold;
    color: #d9534f;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

