glam/frontend/src/components/settings/SettingsPanel.css
2025-12-21 00:01:54 +01:00

390 lines
7.8 KiB
CSS

/**
* Settings Panel Styles
*/
.settings-panel {
padding: 2rem;
max-width: 800px;
margin: 0 auto;
}
.settings-panel h2 {
margin: 0 0 2rem 0;
font-size: 2rem;
font-weight: 600;
color: var(--text-primary);
}
/* Section Styles */
.settings-section {
margin-bottom: 2rem;
padding: 1.5rem;
background: var(--bg-secondary);
border-radius: 8px;
border: 1px solid var(--border-color);
}
.settings-section h3 {
margin: 0 0 1rem 0;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
border-bottom: 2px solid var(--primary-color);
padding-bottom: 0.5rem;
}
.section-description {
margin: 0 0 1rem 0;
font-size: 0.875rem;
color: var(--text-secondary);
}
/* Radio Group for Data Backend */
.radio-group {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.radio-option {
display: flex;
flex-direction: column;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
background: var(--bg-primary);
}
.radio-option:hover {
border-color: var(--primary-color);
background: var(--bg-hover);
}
.radio-option:has(input:checked) {
border-color: var(--primary-color);
background: rgba(59, 130, 246, 0.1);
}
.radio-option input[type="radio"] {
position: absolute;
opacity: 0;
pointer-events: none;
}
.radio-label {
font-size: 0.95rem;
font-weight: 600;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.badge-recommended {
font-size: 0.75rem;
font-weight: 500;
color: #059669;
background: rgba(5, 150, 105, 0.1);
padding: 0.125rem 0.5rem;
border-radius: 4px;
}
.badge-free {
font-size: 0.75rem;
font-weight: 500;
color: #059669;
background: rgba(5, 150, 105, 0.1);
padding: 0.125rem 0.5rem;
border-radius: 4px;
}
.radio-option.disabled {
opacity: 0.5;
cursor: not-allowed;
}
.radio-option.disabled input {
cursor: not-allowed;
}
.radio-description {
font-size: 0.8rem;
color: var(--text-secondary);
margin-top: 0.25rem;
}
/* Setting Item Styles */
.setting-item {
margin-bottom: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.setting-item:last-child {
margin-bottom: 0;
}
.setting-item label {
font-size: 0.95rem;
font-weight: 500;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.setting-item label input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
/* Select Styles */
.setting-item select {
padding: 0.5rem;
font-size: 0.95rem;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--bg-primary);
color: var(--text-primary);
cursor: pointer;
transition: border-color 0.2s;
}
.setting-item select:hover {
border-color: var(--primary-color);
}
.setting-item select:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* Range Input Styles */
.setting-item input[type="range"] {
width: 100%;
height: 6px;
border-radius: 3px;
background: var(--border-color);
outline: none;
cursor: pointer;
}
.setting-item input[type="range"]::-webkit-slider-thumb {
appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--primary-color);
cursor: pointer;
transition: transform 0.2s;
}
.setting-item input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
.setting-item input[type="range"]::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--primary-color);
cursor: pointer;
border: none;
transition: transform 0.2s;
}
.setting-item input[type="range"]::-moz-range-thumb:hover {
transform: scale(1.2);
}
/* Button Styles */
.setting-item button {
padding: 0.5rem 1rem;
font-size: 0.95rem;
border-radius: 4px;
border: none;
cursor: pointer;
transition: all 0.2s;
font-weight: 500;
}
.btn-secondary {
background: var(--bg-secondary);
color: var(--text-primary);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background: var(--bg-hover);
border-color: var(--primary-color);
}
.btn-danger {
background: #ef4444;
color: white;
}
.btn-danger:hover {
background: #dc2626;
}
/* Info Section */
.settings-info {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
}
.info-text {
margin: 0;
font-size: 0.875rem;
color: var(--text-secondary);
line-height: 1.6;
}
/* ==========================================================================
Dark Mode Support - Comprehensive Coverage
Using flat selectors for maximum browser compatibility
========================================================================== */
/* Dark mode - page background */
[data-theme="dark"] .settings-panel {
background: var(--background-color, #1a1a1a);
}
/* Dark mode - headings */
[data-theme="dark"] .settings-panel h2 {
color: var(--text-primary, #f0f0f0);
}
/* Dark mode - sections */
[data-theme="dark"] .settings-section {
background: var(--surface-color, #2a2a2a);
border-color: var(--border-color, #404040);
}
[data-theme="dark"] .settings-section h3 {
color: var(--text-primary, #f0f0f0);
border-bottom-color: var(--primary-color, #64b5f6);
}
/* Dark mode - setting items */
[data-theme="dark"] .setting-item label {
color: var(--text-primary, #f0f0f0);
}
/* Dark mode - select dropdowns */
[data-theme="dark"] .setting-item select {
background: var(--surface-secondary, #333333);
border-color: var(--border-color, #404040);
color: var(--text-primary, #f0f0f0);
}
[data-theme="dark"] .setting-item select:hover {
border-color: var(--primary-color, #64b5f6);
}
[data-theme="dark"] .setting-item select:focus {
border-color: var(--primary-color, #64b5f6);
box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}
/* Dark mode - range inputs */
[data-theme="dark"] .setting-item input[type="range"] {
background: var(--border-color, #404040);
}
/* Dark mode - buttons */
[data-theme="dark"] .btn-secondary {
background: var(--surface-secondary, #333333);
color: var(--text-primary, #f0f0f0);
border-color: var(--border-color, #404040);
}
[data-theme="dark"] .btn-secondary:hover {
background: var(--surface-color, #2a2a2a);
border-color: var(--primary-color, #64b5f6);
}
/* Dark mode - info section */
[data-theme="dark"] .settings-info {
background: var(--surface-secondary, #333333);
border-color: var(--border-color, #404040);
}
[data-theme="dark"] .info-text {
color: var(--text-secondary, #d0d0d0);
}
/* Dark mode - Radio options */
[data-theme="dark"] .radio-option {
background: var(--surface-secondary, #333333);
border-color: var(--border-color, #404040);
}
[data-theme="dark"] .radio-option:hover {
border-color: var(--primary-color, #64b5f6);
background: var(--surface-color, #2a2a2a);
}
[data-theme="dark"] .radio-option:has(input:checked) {
border-color: var(--primary-color, #64b5f6);
background: rgba(100, 181, 246, 0.1);
}
[data-theme="dark"] .radio-label {
color: var(--text-primary, #f0f0f0);
}
[data-theme="dark"] .badge-recommended {
color: #34d399;
background: rgba(52, 211, 153, 0.15);
}
[data-theme="dark"] .badge-free {
color: #34d399;
background: rgba(52, 211, 153, 0.15);
}
[data-theme="dark"] .radio-description {
color: var(--text-secondary, #d0d0d0);
}
[data-theme="dark"] .section-description {
color: var(--text-secondary, #d0d0d0);
}
/* Light Mode - Default values */
.settings-panel {
--bg-primary: #ffffff;
--bg-secondary: #f8fafc;
--bg-tertiary: #f1f5f9;
--bg-hover: #e2e8f0;
--text-primary: #0f172a;
--text-secondary: #64748b;
--border-color: #e2e8f0;
--primary-color: #3b82f6;
}
/* Responsive Design */
@media (max-width: 768px) {
.settings-panel {
padding: 1rem;
}
.settings-section {
padding: 1rem;
}
.settings-panel h2 {
font-size: 1.5rem;
}
.settings-section h3 {
font-size: 1.1rem;
}
}