/* ========== Settings Section ========== */
.settings-section {
    width: 360px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

/* ========== Tabs ========== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 4px 10px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition);
}

.tab:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab .material-symbols-outlined {
    font-size: 22px;
}

/* ========== Tab Panels ========== */
.tab-panel {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.tab-panel.active {
    display: block;
}

.tab-panel::-webkit-scrollbar {
    width: 6px;
}

.tab-panel::-webkit-scrollbar-track {
    background: transparent;
}

.tab-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== Setting Groups ========== */
.setting-group {
    margin-bottom: 18px;
}

.setting-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== Toggle Groups ========== */
.toggle-group {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.toggle {
    flex: 1;
    padding: 7px 12px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}

.toggle:not(:last-child) {
    border-right: 1px solid var(--border);
}

.toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toggle.active {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ========== Color Inputs ========== */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-input-wrapper input[type="color"] {
    width: 40px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    background: var(--bg-tertiary);
    cursor: pointer;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border-radius: 3px;
    border: none;
}

.color-text {
    flex: 1;
    padding: 7px 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: border-color var(--transition);
}

.color-text:focus {
    border-color: var(--border-focus);
}

/* ========== Direction Picker ========== */
.direction-picker {
    display: flex;
    gap: 6px;
}

.direction-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition);
}

.direction-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.direction-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

/* ========== Sliders ========== */
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(99,102,241,0.4);
    transition: transform var(--transition);
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 40px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* ========== Preset Grid ========== */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.preset-swatch {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.preset-swatch:hover {
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.3);
    z-index: 1;
}

.preset-swatch.active {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(99,102,241,0.4);
}

.preset-swatch.transparent-preset {
    background-image:
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #333 75%),
        linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

/* ========== Search ========== */
.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--border-focus);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ========== Text Input ========== */
.text-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.text-input:focus {
    border-color: var(--border-focus);
}

.text-input::placeholder {
    color: var(--text-muted);
}

/* ========== Select Input ========== */
.select-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}

.select-input:focus {
    border-color: var(--border-focus);
}

/* ========== Checkbox ========== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}
