/**
 * Speechable Settings Page Styles
 *
 * @package Speechable
 */

.speechable-settings {
    max-width: 900px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.speechable-settings h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.speechable-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.speechable-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.speechable-card-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.speechable-card-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.speechable-card-body {
    padding: 20px;
}

.speechable-field {
    margin-bottom: 20px;
}

.speechable-field:last-child {
    margin-bottom: 0;
}

.speechable-field > label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.speechable-field .description {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.speechable-field select,
.speechable-field input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    min-width: 200px;
}

.speechable-field select:focus,
.speechable-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.speechable-field input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
}

.speechable-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speechable-range-wrap input[type="range"] {
    flex: 1;
    max-width: 300px;
    height: 6px;
    -webkit-appearance: none;
    background: #e5e7eb;
    border-radius: 3px;
}

.speechable-range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
}

.speechable-range-value {
    min-width: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.speechable-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin-bottom: 8px;
    cursor: pointer;
}

.speechable-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.speechable-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.speechable-color-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speechable-color-item span {
    font-size: 13px;
    color: #374151;
}

.speechable-settings .submit {
    margin-top: 24px;
    padding: 0;
}

.speechable-settings .button-primary {
    background: #2563eb;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.speechable-settings .button-primary:hover {
    background: #1d4ed8;
}

.speechable-preview-box {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.speechable-preview-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.speechable-voice-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speechable-voice-selector select {
    flex: 1;
    min-width: 200px;
}

.speechable-voice-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.speechable-voice-preview-btn:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}

.speechable-voice-preview-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.speechable-voice-preview-btn.is-playing {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.speechable-voice-preview-btn.is-preloading {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

.speechable-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.speechable-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.speechable-preset:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.speechable-preset.active {
    border-color: #2563eb;
    border-width: 2px;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.speechable-preset-custom {
    border-style: dashed;
    background: #f9fafb;
}

.speechable-preset-custom.active {
    border-color: #6b7280;
    border-style: dashed;
    background: #f3f4f6;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.speechable-preset-icon {
    font-size: 18px;
    line-height: 1;
}

.speechable-preset-name {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    letter-spacing: 0.01em;
}

.speechable-preview-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    cursor: default;
}

.speechable-preview-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.speechable-preview-fill {
    width: 35%;
    height: 100%;
    background: #2563eb;
}

.speechable-preview-time {
    font-size: 13px;
    color: #1a1a1a;
}


/* Color Scheme Selector */
.speechable-scheme-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.speechable-scheme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 75px;
}

.speechable-scheme-option:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.speechable-scheme-option.active {
    border-color: #2563eb;
    border-width: 2px;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.speechable-scheme-option input[type="radio"] {
    display: none;
}

.speechable-scheme-icon {
    font-size: 20px;
    line-height: 1;
}

.speechable-scheme-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

/* Dark mode color section */
.speechable-colors-dark {
    padding: 16px;
    background: #1f2937;
    border-radius: 8px;
    margin-top: 16px;
}

.speechable-colors-dark > label {
    color: #f3f4f6 !important;
}

.speechable-colors-dark .speechable-color-item span {
    color: #d1d5db;
}

.speechable-colors-dark .speechable-color-grid {
    background: transparent;
}

/* Preview toggle */
.speechable-preview-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.speechable-preview-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s;
}

.speechable-preview-mode-btn:hover {
    background: #f3f4f6;
    border-color: #2563eb;
}

.speechable-preview-mode-btn.dark-mode {
    background: #1f2937;
    border-color: #374151;
}

/* Dark preview mode */
.speechable-preview-box.dark-preview {
    background: #111827;
    border-color: #374151;
}

.speechable-preview-box.dark-preview .speechable-preview-player {
    background: #1f2937;
    border-color: #374151;
}

.speechable-preview-box.dark-preview .speechable-preview-time {
    color: #f3f4f6;
}

.speechable-preview-box.dark-preview .speechable-preview-bar {
    background: #374151;
}
