/* Luma/Brightness Checker — custom styles */

/* Formula display */
.formula {
    background: #f3f4f6;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 180px;
}

.control-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.control-group select,
.control-group input[type="file"] {
    padding: 0.45rem 0.6rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 0.875rem;
}

.control-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.control-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: #f9fafb;
}

.color-value {
    font-size: 0.8125rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

/* Preview */
#preview {
    width: 100%;
    min-height: 100px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e6ed;
    overflow: hidden;
}

/* Hidden image */
.hidden {
    display: none;
}

/* Results */
.results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    background: #f9fafb;
    font-size: 0.875rem;
}

.result-row.pass {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.result-row.fail {
    background: #fef2f2;
    border-color: #fecaca;
}

.result-label {
    color: #374151;
    font-weight: 500;
}

.result-value {
    font-weight: 700;
    font-size: 0.875rem;
}

.result-row.pass .result-value {
    color: #166534;
}

.result-row.fail .result-value {
    color: #991b1b;
}

.sample-sizes {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Luminance display */
.luminance-display {
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* FAQ */
.faq {
    margin-bottom: 1.5rem;
}

.faq details {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq details summary {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: #f9fafb;
    color: #111827;
    list-style: none;
}

.faq details summary::-webkit-details-marker {
    display: none;
}

.faq details p {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    border-top: 1px solid #e0e6ed;
    margin: 0;
}

/* Related links */
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-links a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.related-links a:hover {
    background: #dbeafe;
}

/* Dark mode */
html[data-theme="dark"] .formula {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

html[data-theme="dark"] .control-group label {
    color: #d1d5db;
}

html[data-theme="dark"] .control-group select,
html[data-theme="dark"] .control-group input[type="file"] {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

html[data-theme="dark"] .control-group input[type="color"] {
    background: #111827;
    border-color: #374151;
}

html[data-theme="dark"] #preview {
    border-color: #374151;
}

html[data-theme="dark"] .result-row {
    background: #1f2937;
    border-color: #374151;
}

html[data-theme="dark"] .result-row.pass {
    background: #052e16;
    border-color: #166534;
}

html[data-theme="dark"] .result-row.fail {
    background: #450a0a;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .result-label {
    color: #d1d5db;
}

html[data-theme="dark"] .result-row.pass .result-value {
    color: #86efac;
}

html[data-theme="dark"] .result-row.fail .result-value {
    color: #fca5a5;
}

html[data-theme="dark"] .luminance-display {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

html[data-theme="dark"] .faq details {
    border-color: #374151;
}

html[data-theme="dark"] .faq details summary {
    background: #111827;
    color: #f9fafb;
}

html[data-theme="dark"] .faq details p {
    color: #d1d5db;
    border-color: #374151;
}

html[data-theme="dark"] .related-links a {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1d4ed8;
}
