/* Color Picker & Color Converter Studio Styles */

/* Premium Glassmorphic Cards */
.color-glass {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .color-glass {
    background: rgba(18, 18, 22, 0.68);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
}

.color-glass :is(h2, h3, .color-readable-title) {
    color: #0f172a;
}

.dark .color-glass :is(h2, h3, .color-readable-title) {
    color: #f8fafc;
}

.color-glass :is(p, label, .color-readable-muted) {
    color: #475569;
}

.dark .color-glass :is(p, label, .color-readable-muted) {
    color: #94a3b8;
}

.color-glass :is(input:not([type='range']):not([type='color']), select, textarea) {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.9);
    color: #0f172a;
}

.dark .color-glass :is(input:not([type='range']):not([type='color']), select, textarea) {
    background: rgba(9, 9, 11, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.color-glass :is(input:not([type='range']):not([type='color']), select, textarea):focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.color-soft-panel {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(226, 232, 240, 0.95);
}

.dark .color-soft-panel {
    background: rgba(9, 9, 11, 0.55);
    border-color: rgba(255, 255, 255, 0.06);
}

.color-muted-button {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(148, 163, 184, 0.35);
    color: #334155;
    transition: all 0.2s ease;
}

.color-muted-button:hover {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(148, 163, 184, 0.5);
    color: #0f172a;
}

.dark .color-muted-button {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.dark .color-muted-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.color-palette-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(226, 232, 240, 0.95);
    color: #18181b;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease;
}

.color-palette-card:hover {
    color: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(6, 182, 212, 0.15);
}

.dark .color-palette-card {
    background: rgba(9, 9, 11, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dark .color-palette-card:hover {
    color: #67e8f9;
    border-color: rgba(103, 232, 249, 0.3);
}

/* Native Color Input Swatch */
.color-picker-input {
    appearance: none;
    inline-size: 100%;
    block-size: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: 0;
    border-radius: 0.5rem;
}

.color-picker-input::-moz-color-swatch {
    border: 0;
    border-radius: 0.5rem;
}

/* 2D Canvas Picker */
.picker-2d-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.picker-2d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.picker-2d-pointer {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.8), inset 0 0 3px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.05s ease-out;
}

/* Checkerboard Background for Transparency */
.bg-checkerboard {
    background-color: #ffffff;
    background-image: linear-gradient(45deg, #cbd5e1 25%, transparent 25%),
                      linear-gradient(-45deg, #cbd5e1 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #cbd5e1 75%),
                      linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.dark .bg-checkerboard {
    background-color: #09090b;
    background-image: linear-gradient(45deg, #27272a 25%, transparent 25%),
                      linear-gradient(-45deg, #27272a 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #27272a 75%),
                      linear-gradient(-45deg, transparent 75%, #27272a 75%);
}

/* Custom Range Sliders */
.slider-hue {
    appearance: none;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(to right,
        #ff0000 0%, #ffff00 17%, #00ff00 33%,
        #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.slider-hue::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #09090b;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease;
}

.slider-hue::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-alpha {
    appearance: none;
    height: 14px;
    border-radius: 7px;
    outline: none;
}

.slider-alpha::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #09090b;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease;
}

.slider-alpha::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Image Sampler Canvas */
.image-canvas-container {
    position: relative;
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    border-radius: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.image-canvas-container canvas {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

/* Premium WCAG Compliance Result Cards */
.wcag-compliance-card {
    position: relative;
    border-radius: 1.1rem;
    padding: 0.9rem 0.75rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

.dark .wcag-compliance-card {
    background: rgba(9, 9, 11, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
}

.wcag-compliance-card.wcag-card-pass {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 6px 18px -4px rgba(16, 185, 129, 0.15);
}

.dark .wcag-compliance-card.wcag-card-pass {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 6px 20px -4px rgba(16, 185, 129, 0.25);
}

.wcag-compliance-card.wcag-card-fail {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.07) 0%, rgba(244, 63, 94, 0.01) 100%);
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 4px 14px -4px rgba(244, 63, 94, 0.1);
}

.dark .wcag-compliance-card.wcag-card-fail {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.13) 0%, rgba(244, 63, 94, 0.02) 100%);
    border-color: rgba(244, 63, 94, 0.35);
    box-shadow: 0 4px 18px -4px rgba(244, 63, 94, 0.18);
}

/* WCAG Badges */
.wcag-pass {
    background: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.dark .wcag-pass {
    background: #10b981;
    border-color: rgba(52, 211, 153, 0.5);
    color: #09090b;
}

.wcag-fail {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #be123c;
}

.dark .wcag-fail {
    background: rgba(244, 63, 94, 0.18);
    border-color: rgba(244, 63, 94, 0.45);
    color: #fda4af;
}
