/**
 * Admin Styles for HumanGate Plugin
 * Dark Mode Design - DarkAI Style
 */

/* CSS Variables - DarkAI Color Scheme */
:root {
    --bg-primary: #1d2327;
    --bg-secondary: #1d2327;
    --bg-panel: #1d2327;
    --bg-alt: #1d2327;
    --accent: #ff6b6b;
    --accent-dark: #d9353e;
    --accent-soft: rgba(255, 107, 107, 0.18);
    --text-main: #f3f4f7;
    --text-muted: #e5e7eb; /* High contrast light gray */
    --text-soft: #d1d5db; /* Medium contrast gray */
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(217, 53, 62, 0.3);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 4px 16px rgba(217, 53, 62, 0.2);
}

/* Override WordPress admin defaults for dark theme */
.block-ai-admin {
    max-width: 1200px;
    background: var(--bg-panel);
    color: var(--text-main);
    padding: 30px;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(10px);
}

/* Ensure wrap doesn't interfere */
.wrap .block-ai-admin {
    margin-left: 0;
}

/* Make WordPress admin background grey (standard WordPress admin color) */
.toplevel_page_block-ai-plugin #wpcontent,
.toplevel_page_block-ai-plugin #wpbody-content {
    background: #f0f0f1;
}

/* Add padding around the wrap to create the middle layer effect */
.toplevel_page_block-ai-plugin .wrap {
    padding: 20px;
    background: #f0f0f1;
}

/* Plugin Header with Logo */
.block-ai-admin .plugin-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.block-ai-admin .plugin-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.block-ai-admin .plugin-header-text {
    flex: 1;
}

.block-ai-admin h1 {
    color: var(--text-main);
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Description text */
.block-ai-admin .description {
    color: var(--text-muted);
    font-style: normal;
    margin-top: 0.5em;
    margin-bottom: 2em;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Improve contrast for descriptions on colored backgrounds */
.block-ai-admin .description,
.block-ai-admin p.description {
    color: #e5e7eb !important; /* High contrast light gray */
}

/* High contrast text for info boxes and colored backgrounds */
.block-ai-admin [style*="background: rgba"],
.block-ai-admin [style*="background: linear-gradient"] p,
.block-ai-admin [style*="background: rgba"] p,
.block-ai-admin [style*="background: rgba"] span {
    color: #f3f4f7 !important; /* Very light, high contrast */
}

/* Specific fixes for colored info boxes */
.block-ai-admin [style*="rgba(255, 107, 107"] p,
.block-ai-admin [style*="rgba(59, 130, 246"] p {
    color: #ffffff !important;
}

.block-ai-admin [style*="rgba(255, 107, 107"] span:not(.tooltip-trigger),
.block-ai-admin [style*="rgba(59, 130, 246"] span:not(.tooltip-trigger) {
    color: #f0f0f0 !important;
}

/* Form Table */
.block-ai-admin .form-table {
    background: var(--bg-panel);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Select dropdown with caret */
.block-ai-admin .select-wrapper {
    position: relative;
    display: inline-block;
}

.block-ai-admin .select-wrapper select {
    cursor: pointer;
}

.block-ai-admin .select-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.8em;
    z-index: 1;
}

.block-ai-admin .form-table th {
    width: 250px;
    padding: 20px 15px 20px 0;
    color: var(--text-main);
    font-weight: 600;
    vertical-align: top;
    font-size: 0.95em;
}

.block-ai-admin .form-table td {
    padding: 15px;
    color: var(--text-muted);
}

.block-ai-admin .form-table label {
    color: var(--text-main);
    font-weight: 400;
    margin-left: 8px;
    cursor: pointer;
}

.block-ai-admin .form-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.block-ai-admin .form-table input[type="number"] {
    background: var(--bg-alt);
    border: 1.5px solid var(--border-soft);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-ai-admin .form-table input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(217, 53, 62, 0.15), 0 2px 8px rgba(217, 53, 62, 0.1);
    transform: translateY(-1px);
}

.block-ai-admin .form-table .description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-top: 8px;
}

/* Options Panels */
.block-ai-admin .lockdown-options,
.block-ai-admin .friction-options {
    background: var(--bg-alt);
    border: 1px solid var(--border-soft);
    border-left: 4px solid var(--accent);
    padding: 1.5em;
    margin-top: 1em;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-ai-admin .lockdown-options:hover,
.block-ai-admin .friction-options:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-accent);
}

.block-ai-admin .friction-options h4 {
    margin-top: 0;
    margin-bottom: 1em;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
}

.block-ai-admin .friction-options p {
    margin: 1em 0;
    color: var(--text-muted);
}

.block-ai-admin .friction-options label {
    color: var(--text-muted);
    margin-right: 12px;
}

/* Navigation Tabs */
.block-ai-admin .nav-tab-wrapper {
    margin: 1rem 0 1rem;
    border-bottom: 2px solid var(--border-soft);
    padding: 0;
}

.block-ai-admin .nav-tab {
    background: var(--bg-panel);
    color: var(--text-muted);
    border: 1.5px solid var(--border-soft);
    border-bottom: none;
    padding: 12px 24px;
    text-decoration: none;
    margin-right: 4px;
    border-radius: 10px 10px 0 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.2px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.block-ai-admin .nav-tab:hover {
    background: var(--bg-alt);
    color: var(--text-main);
    border-color: var(--border-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 53, 62, 0.2);
}

.block-ai-admin .nav-tab.nav-tab-active {
    background: linear-gradient(135deg, #f97373 0%, #d9353e 100%);
    color: #ffffff;
    border-color: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(217, 53, 62, 0.4), 0 2px 8px rgba(217, 53, 62, 0.3);
    transform: translateY(-1px);
    position: relative;
    bottom: -2px;
}

/* Tab Content */
.block-ai-admin .tab-content {
    background: var(--bg-panel);
    padding: 2rem;
    border: 1px solid var(--border-soft);
    border-radius: 0 12px 12px 12px;
    margin-top: -2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.block-ai-admin .tab-content h2 {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 2.5rem;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.4px;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.block-ai-admin .tab-content h2:not(:first-child) {
    margin-top: 2.5rem;
}

/* Collapsible Sections */
.block-ai-admin .collapsible-section {
    margin-bottom: 0;
}

.block-ai-admin .collapsible-section:not(:first-child) {
    margin-top: 2.5rem;
}

.block-ai-admin .collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 0;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
    margin-top: 0;
    border-bottom: 1px solid var(--border-soft);
    transition: all 0.2s ease;
    color: var(--text-main);
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.block-ai-admin .collapsible-header:hover {
    color: var(--accent);
    border-bottom-color: var(--border-accent);
}

.block-ai-admin .collapsible-header.active {
    border-bottom-color: var(--accent);
    margin-bottom: 1.5rem;
}

.block-ai-admin .collapsible-header span:first-child {
    flex: 1;
}

.block-ai-admin .collapsible-header .toggle-icon {
    font-size: 0.7em;
    color: var(--accent);
    transition: transform 0.3s ease;
    margin-left: 1rem;
    flex-shrink: 0;
    width: 1em;
    text-align: center;
}

.block-ai-admin .collapsible-header.active .toggle-icon {
    transform: rotate(0deg);
}

.block-ai-admin .collapsible-header:not(.active) .toggle-icon {
    transform: rotate(-90deg);
}

.block-ai-admin .collapsible-content {
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.block-ai-admin .tab-content h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25em;
    font-weight: 600;
}

/* Stat Boxes */
.block-ai-admin .telemetry-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.block-ai-admin .stat-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Ensure stat-box children that need clipping (like the gradient bar) still work */
.block-ai-admin .stat-box::before {
    position: absolute;
    overflow: hidden;
}

.block-ai-admin .stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f97373, #d9353e);
    opacity: 0;
    transition: opacity 0.3s;
}

.block-ai-admin .stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 53, 62, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--border-accent);
}

.block-ai-admin .stat-box:hover::before {
    opacity: 1;
}

.block-ai-admin .stat-box h3 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
    word-break: break-word;
    overflow-wrap: break-word;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.block-ai-admin .stat-box:has(small) h3 {
    font-size: 1.75rem;
}

.block-ai-admin .stat-box h3.stat-none {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

.block-ai-admin .stat-box p {
    margin: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.block-ai-admin .stat-box small {
    color: var(--text-soft);
    font-size: 0.8125em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    display: block;
    margin-top: 0.5rem;
    word-break: break-word;
}

/* Tables */
.block-ai-admin .wp-list-table {
    margin-top: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.block-ai-admin .wp-list-table thead th {
    background: #1d2327;
    color: #ffffff;
    border-bottom: 2px solid var(--border-soft);
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.block-ai-admin .wp-list-table tbody tr {
    transition: background 0.2s;
    background: transparent !important;
}

.block-ai-admin .wp-list-table tbody tr:nth-child(odd),
.block-ai-admin .wp-list-table.striped tbody tr:nth-child(odd),
.block-ai-admin .wp-list-table tbody tr.odd,
.block-ai-admin .wp-list-table.widefat tbody tr:nth-child(odd),
.block-ai-admin .wp-list-table.fixed tbody tr:nth-child(odd) {
    background: transparent !important;
}

.block-ai-admin .wp-list-table tbody tr:nth-child(even),
.block-ai-admin .wp-list-table.striped tbody tr:nth-child(even),
.block-ai-admin .wp-list-table tbody tr.even,
.block-ai-admin .wp-list-table.widefat tbody tr:nth-child(even),
.block-ai-admin .wp-list-table.fixed tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02) !important;
}

.block-ai-admin .wp-list-table tbody td,
.block-ai-admin .wp-list-table.widefat tbody td,
.block-ai-admin .wp-list-table.fixed tbody td,
.block-ai-admin .wp-list-table.striped tbody td {
    color: #f3f4f7 !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid var(--border-soft) !important;
    background: transparent !important;
}

.block-ai-admin .wp-list-table tbody td *,
.block-ai-admin .wp-list-table tbody tr td {
    color: #f3f4f7 !important;
}

.block-ai-admin .wp-list-table tbody tr:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    box-shadow: inset 3px 0 0 var(--accent-dark);
}

.block-ai-admin .wp-list-table tbody tr:hover td {
    background: transparent !important;
}

.block-ai-admin .wp-list-table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.block-ai-admin .button-primary,
.block-ai-admin input[type="submit"].button-primary {
    background: linear-gradient(135deg, #f97373 0%, #d9353e 100%);
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(217, 53, 62, 0.3);
    letter-spacing: 0.2px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.block-ai-admin .button-primary:hover,
.block-ai-admin input[type="submit"].button-primary:hover {
    background: linear-gradient(135deg, #d9353e 0%, #b91c1c 100%);
    border-color: #b91c1c;
    box-shadow: 0 4px 16px rgba(217, 53, 62, 0.4), 0 2px 8px rgba(217, 53, 62, 0.3);
    transform: translateY(-1px);
}

.block-ai-admin .button-primary:active,
.block-ai-admin input[type="submit"].button-primary:active {
    transform: translateY(0);
}

/* Secondary buttons - match dark theme */
.block-ai-admin .button-secondary,
.block-ai-admin input[type="submit"].button-secondary,
.block-ai-admin .button {
    background: #1d2327;
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.2px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.block-ai-admin .button-secondary:hover,
.block-ai-admin input[type="submit"].button-secondary:hover,
.block-ai-admin .button:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
    transform: translateY(-1px);
}

.block-ai-admin .button-secondary:active,
.block-ai-admin input[type="submit"].button-secondary:active,
.block-ai-admin .button:active {
    transform: translateY(0);
}

/* Warning Styles */
.block-ai-admin .description.warning,
.block-ai-admin .description[style*="color: #d63638"] {
    color: var(--accent) !important;
    background: rgba(217, 53, 62, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-dark);
    margin-top: 10px;
    display: block;
}

/* Tooltips */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    line-height: 1;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    margin-left: 0.5em;
    vertical-align: middle;
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 107, 107, 0.3);
    flex-shrink: 0;
}

.tooltip-trigger:hover {
    background: rgba(255, 107, 107, 0.25);
    color: #ff8a8a;
    border-color: rgba(255, 107, 107, 0.5);
    transform: scale(1.05);
}

/* Tooltip - will be positioned via JavaScript with position:fixed to escape containers */
.tooltip-trigger::before {
    display: none; /* Disable CSS tooltip, using JS instead */
}

.tooltip-trigger::after {
    display: none; /* Disable CSS tooltip, using JS instead */
}

/* Tooltip popup (created via JavaScript as fallback) */
.tooltip-popup {
    position: fixed;
    background: rgba(0, 0, 0, 0.98);
    color: #ffffff;
    padding: 0.875em 1.125em;
    border-radius: 8px;
    font-size: 0.875em;
    line-height: 1.6;
    white-space: normal;
    width: 300px;
    max-width: calc(100vw - 40px);
    z-index: 999999;
    text-align: left;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    word-wrap: break-word;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WordPress Admin Notices - Dark Theme Compatible */
.block-ai-admin ~ .notice,
.wrap .notice {
    background: rgba(0, 0, 0, 0.95) !important;
    border-left: 4px solid var(--accent) !important;
    color: var(--text-main) !important;
    padding: 12px 20px !important;
    margin: 15px 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.block-ai-admin ~ .notice p,
.wrap .notice p {
    color: #ffffff !important;
    margin: 0.5em 0 !important;
}

.block-ai-admin ~ .notice strong,
.wrap .notice strong {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

.block-ai-admin ~ .notice.notice-info {
    border-left-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.block-ai-admin ~ .notice.notice-warning {
    border-left-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.block-ai-admin ~ .notice.notice-success {
    border-left-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.block-ai-admin ~ .notice.notice-error {
    border-left-color: var(--accent) !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

/* Global Refusal Toggle Section */
.block-ai-admin .global-refusal-toggle-section label:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 107, 107, 0.2) !important;
}

.block-ai-admin .global-refusal-toggle-section input[type="checkbox"]:checked + div {
    color: var(--text-main);
}

/* Enforcement Mode Cards */
.enforcement-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Responsive: On smaller screens, stack cards */
@media (max-width: 1200px) {
    .enforcement-modes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .enforcement-modes {
        grid-template-columns: 1fr;
    }
}

.enforcement-mode-card {
    background: #1d2327;
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.enforcement-mode-card:hover {
    border-color: var(--accent-soft);
    background: #1d2327;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.enforcement-mode-card.active {
    border-color: var(--accent);
    background: rgba(255, 107, 107, 0.08);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
}

.enforcement-mode-label {
    cursor: pointer;
    display: block;
}

.enforcement-mode-label input[type="radio"] {
    display: none;
}

.mode-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mode-header::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-soft);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
}

.enforcement-mode-card.active .mode-header::before {
    border-color: var(--accent);
    background: var(--accent);
}

.enforcement-mode-card.active .mode-header::after {
    content: '';
    position: absolute;
    left: 1.75rem;
    top: 1.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
}

.mode-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mode-title strong {
    font-size: 1.1em;
    color: var(--text-main);
    font-weight: 600;
}

.mode-badge {
    font-size: 0.75em;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-badge-default {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.mode-badge-balanced {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.mode-badge-maximum {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.mode-description {
    color: #e5e7eb;
    margin: 0.75rem 0 1rem 0;
    line-height: 1.6;
    font-size: 0.95em;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-features li {
    color: #d1d5db;
    font-size: 0.9em;
    padding-left: 0;
    line-height: 1.5;
}

.mode-features li:before {
    content: '';
    display: inline-block;
    width: 0;
    margin-right: 0;
}

.enforcement-mode-card.active .mode-features li {
    color: #e5e7eb;
}

/* Responsive */
@media (max-width: 782px) {
    .block-ai-admin {
        margin: 10px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .block-ai-admin .plugin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .block-ai-admin .plugin-logo {
        height: 48px;
    }
    
    .block-ai-admin .form-table th,
    .block-ai-admin .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .block-ai-admin .telemetry-stats {
        grid-template-columns: 1fr;
    }
    
    .block-ai-admin h1 {
        font-size: 1.5em;
    }
    
    .enforcement-modes {
        grid-template-columns: 1fr;
    }
}

/* Smooth transitions */
.block-ai-admin * {
    transition-property: color, background-color, border-color, transform, box-shadow;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Remove transitions for performance-critical elements */
svg, canvas {
    transition: none;
}

/* Focus states for accessibility */
.block-ai-admin *:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection */
.block-ai-admin ::selection {
    background: rgba(255, 107, 107, 0.3);
    color: var(--text-main);
}
