/* Token Management Page Styles */

.token-card {
    transition: all 0.3s ease;
    background-color: var(--bs-body-bg);
    border-radius: var(--bs-border-radius-lg, 0.5rem);
    border: 1px solid var(--bs-border-color, #dee2e6);
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 15%);
}

.token-card:hover {
    transform: translateY(-2px);
    background-color: var(--bs-card-cap-bg, var(--bs-body-bg));
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-authorized {
    background-color: var(--bs-success);
    box-shadow: 0 0 0 2px rgb(40 167 69 / 30%);
}

.status-unauthorized {
    background-color: var(--bs-danger);
    box-shadow: 0 0 0 2px rgb(220 53 69 / 30%);
}

.token-info {
    background: linear-gradient(45deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-info-rgb), 0.1));
    border-radius: var(--bs-border-radius, 8px);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

html[data-theme="darkly"] .token-info {
    background: linear-gradient(45deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-info-rgb), 0.08));
    border-color: rgba(var(--bs-primary-rgb), 0.15);
}

.scope-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
}

html[data-theme="darkly"] .scope-badge {
    background: rgba(var(--bs-primary-rgb), 0.15);
    color: rgba(var(--bs-primary-rgb), 0.9);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--bs-primary, #0d6efd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Additional styles for the character sync status table */
.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

html[data-theme="darkly"] .table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.table th {
    vertical-align: middle;
}

/* ===== COMPREHENSIVE DARKLY MODE OVERRIDES ===== */

/* Token cards */
html[data-theme="darkly"] .token-card {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.92);
    border-color: rgba(var(--bs-light-rgb), 0.15);
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 45%);
}

html[data-theme="darkly"] .token-card:hover {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.96);
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 55%);
}

/* Form inputs */
html[data-theme="darkly"] .form-control,
html[data-theme="darkly"] .form-select {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.88);
    color: var(--bs-light);
    border-color: rgba(var(--bs-light-rgb), 0.15);
}

html[data-theme="darkly"] .form-control:focus,
html[data-theme="darkly"] .form-select:focus {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.92);
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    color: var(--bs-light);
}

/* Labels */
html[data-theme="darkly"] label {
    color: var(--bs-light);
}

/* Help text */
html[data-theme="darkly"] .form-text {
    color: rgba(var(--bs-light-rgb), 0.65);
}

/* List groups */
html[data-theme="darkly"] .list-group-item {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.92);
    border-color: rgba(var(--bs-light-rgb), 0.12);
    color: var(--bs-light);
}

html[data-theme="darkly"] .list-group-item:hover {
    background-color: rgba(var(--bs-body-bg-rgb, 15, 23, 42), 0.96);
}

/* Background utility classes */
html[data-theme="darkly"] .bg-body-tertiary,
html[data-theme="darkly"] .bg-body-secondary,
html[data-theme="darkly"] .bg-light,
html[data-theme="darkly"] .bg-white {
    background-color: #303030 !important;
}

html[data-theme="darkly"] [class*="subtle"] {
    background-color: #303030 !important;
}

/* Ensure badges stay readable in darkly */
html[data-theme="darkly"] .badge.bg-primary-subtle,
html[data-theme="darkly"] .badge.bg-info-subtle {
    color: var(--bs-body-color) !important;
    background-color: #303030 !important;
    border: 1px solid rgba(var(--bs-border-color-rgb, 128, 128, 128), 0.4) !important;
}


/* Section headings in token page */
html[data-theme="darkly"] .token-section-heading {
    color: var(--bs-light);
}

/* Token expiry notice */
html[data-theme="darkly"] .token-expiry-notice {
    background: rgba(var(--bs-warning-rgb), 0.12);
    border-color: rgba(var(--bs-warning-rgb), 0.25);
    color: rgba(var(--bs-warning-rgb), 0.9);
}
