/* Modal Overlay - Required for modal to display */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay, rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

/* Settings Modal Specific Styles */
.settings-modal {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
}

/* Override modal-container for settings */
.settings-modal.modal-container {
    padding: 0;
}

/* Settings Modal Container - Flex layout */
.settings-modal-container {
    width: 900px;
    max-width: 90%;
    height: 600px;
    max-height: 85vh;
    background: #2b2b2b;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Settings Modal Header */
.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.settings-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.settings-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.settings-modal-close:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

/* Settings Modal Body - Scrollable */
.settings-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* Important for flexbox overflow */
}

/* Settings Tabs - Horizontal */
.settings-tabs {
    padding: 0 24px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.tab-button {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    text-align: center;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tab-button.active {
    background: #1e90ff;
    color: white;
    font-weight: 500;
}

/* Settings Content */
.settings-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.settings-modal .tab-content {
    display: none;
}

.settings-modal .tab-content.active {
    display: block;
}

.settings-modal .tab-content h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* Setting Groups */
.setting-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-description {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.setting-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Admin Section */
.admin-section {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.admin-section p {
    font-size: 14px;
    color: var(--text-secondary, #666);
    margin: 8px 0;
}

.admin-section ul {
    margin: 12px 0 12px 20px;
    padding: 0;
    list-style: disc;
}

.admin-section li {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin: 4px 0;
}

.backup-info {
    margin: 12px 0;
}

.backup-status {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    min-height: 40px;
    display: none;
}

.backup-status.visible {
    display: block;
}

.backup-status.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.backup-status.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.backup-status.info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Coming Soon */
.coming-soon {
    font-style: italic;
    color: var(--text-tertiary, #999);
    font-size: 13px;
}

/* About Section */
.about-info {
    text-align: center;
    padding: 20px;
}

.about-logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.about-info h4 {
    margin: 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.about-info p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--text-secondary, #666);
}

.about-features {
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.about-features h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.about-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.about-features li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.about-features li:before {
    content: "✓ ";
    color: var(--success, #27ae60);
    font-weight: bold;
    margin-right: 8px;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.about-links a {
    color: var(--primary-color, #3b82f6);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.about-links a:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

/* Settings Modal Footer */
.settings-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Button Styles - REMOVED: Now using /css/components/buttons.css for all button styles */

/* Dark Theme Overrides */
[data-theme="dark"] .settings-modal-container {
    background: #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .settings-modal-header {
    background: #1a1a1a;
    border-bottom-color: #333;
}

[data-theme="dark"] .settings-tabs {
    background: #222;
    border-right-color: #333;
}

[data-theme="dark"] .tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .tab-button.active {
    background: #3b82f6;
}

[data-theme="dark"] .setting-group {
    border-bottom-color: #333;
}

[data-theme="dark"] .setting-select {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .admin-section {
    background: #222;
    border-color: #333;
}

[data-theme="dark"] .backup-status {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .about-features {
    background: #222;
}

/* Button theme styles moved to /css/components/buttons.css */

[data-theme="dark"] .settings-modal-footer {
    background: #1a1a1a;
    border-top-color: #333;
}