/* ============================================
   RSL Color Picker Component
   Version: 1.0.0
   Description: Premium accessible color picker with
   WCAG contrast checking, multiple selection modes,
   and full ADA/WCAG 2.1 AA compliance.
   ============================================ */

/* ===========================================
   CSS Custom Properties
   =========================================== */
:root {
    /* Color Picker Variables */
    --rsl-cp-bg: #ffffff;
    --rsl-cp-border: #e0e0e0;
    --rsl-cp-border-focus: #6E7BFF;
    --rsl-cp-text: #333333;
    --rsl-cp-text-muted: #666666;
    --rsl-cp-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --rsl-cp-radius: 8px;
    --rsl-cp-swatch-size: 48px;
    --rsl-cp-swatch-gap: 8px;
    --rsl-cp-transition: 0.2s ease;

    /* Status Colors */
    --rsl-cp-pass: #10B981;
    --rsl-cp-fail: #EF4444;
    --rsl-cp-warn: #F59E0B;
}

/* ===========================================
   Base Container
   =========================================== */
.rsl-color-picker {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rsl-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
   Trigger Button
   =========================================== */
.rsl-color-picker-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--rsl-cp-bg);
    border: 2px solid var(--rsl-cp-border);
    border-radius: var(--rsl-cp-radius);
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
    min-width: 180px;
    font-size: 0.95rem;
    color: var(--rsl-cp-text);
}

.rsl-color-picker-trigger:hover {
    border-color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-trigger:focus {
    outline: none;
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.2);
}

.rsl-color-picker-trigger:focus-visible {
    outline: 2px solid var(--rsl-cp-border-focus);
    outline-offset: 2px;
}

.rsl-color-picker-trigger[aria-expanded="true"] {
    border-color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-trigger[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Swatch Preview in Trigger */
.rsl-color-picker-swatch-preview {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                      linear-gradient(-45deg, #ccc 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #ccc 75%),
                      linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    position: relative;
    overflow: hidden;
}

.rsl-color-picker-swatch-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--swatch-color, transparent);
    border-radius: inherit;
}

.rsl-color-picker-value-display {
    flex: 1;
    text-align: left;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--rsl-cp-text);
}

.rsl-color-picker-trigger .dropdown-icon {
    margin-left: auto;
    transition: transform var(--rsl-cp-transition);
    color: var(--rsl-cp-text-muted);
    font-size: 0.75rem;
}

.rsl-color-picker-trigger[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* ===========================================
   Dialog/Popover
   =========================================== */
.rsl-color-picker-dialog {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1000;
    background: var(--rsl-cp-bg);
    border: 1px solid var(--rsl-cp-border);
    border-radius: var(--rsl-cp-radius);
    box-shadow: var(--rsl-cp-shadow);
    padding: 1.25rem;
    min-width: 320px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--rsl-cp-transition);
}

.rsl-color-picker-dialog.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rsl-color-picker-dialog[data-position="top"] {
    top: auto;
    bottom: calc(100% + 8px);
}

.rsl-color-picker-dialog[data-position="right"] {
    left: auto;
    right: 0;
}

/* Dialog Header */
.rsl-color-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rsl-cp-border);
}

.rsl-color-picker-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rsl-cp-text);
    margin: 0;
}

.rsl-color-picker-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--rsl-cp-text-muted);
    border-radius: 4px;
    transition: all var(--rsl-cp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsl-color-picker-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--rsl-cp-text);
}

.rsl-color-picker-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--rsl-cp-border-focus);
}

/* ===========================================
   Mode Tabs
   =========================================== */
.rsl-color-picker-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 6px;
}

.rsl-color-picker-tab {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rsl-cp-text-muted);
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
}

.rsl-color-picker-tab:hover {
    color: var(--rsl-cp-text);
}

.rsl-color-picker-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--rsl-cp-border-focus);
}

.rsl-color-picker-tab[aria-selected="true"] {
    background: var(--rsl-cp-bg);
    color: var(--rsl-cp-border-focus);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Palette Grid
   =========================================== */
.rsl-color-picker-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--rsl-cp-swatch-size), 1fr));
    gap: var(--rsl-cp-swatch-gap);
    margin-bottom: 1rem;
}

.rsl-color-picker-palette[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

.rsl-color-picker-palette[data-columns="8"] {
    grid-template-columns: repeat(8, 1fr);
}

/* Individual Swatch */
.rsl-color-picker-swatch {
    position: relative;
    width: var(--rsl-cp-swatch-size);
    height: var(--rsl-cp-swatch-size);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: all var(--rsl-cp-transition);
    background: var(--swatch-color);
    /* Checkerboard for transparency */
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                      linear-gradient(-45deg, #ccc 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #ccc 75%),
                      linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    overflow: hidden;
}

.rsl-color-picker-swatch::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--swatch-color);
    border-radius: inherit;
}

.rsl-color-picker-swatch:hover {
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rsl-color-picker-swatch:focus {
    outline: none;
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.3);
    z-index: 2;
}

.rsl-color-picker-swatch[aria-selected="true"] {
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.3);
}

/* Checkmark for selected swatch */
.rsl-color-picker-swatch[aria-selected="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.rsl-color-picker-swatch[aria-selected="true"] .check-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--rsl-cp-border-focus);
    font-size: 0.875rem;
    z-index: 2;
}

/* Contrast indicator on swatch */
.rsl-color-picker-swatch .contrast-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--rsl-cp-bg);
    z-index: 1;
}

.rsl-color-picker-swatch .contrast-badge.pass {
    background: var(--rsl-cp-pass);
}

.rsl-color-picker-swatch .contrast-badge.fail {
    background: var(--rsl-cp-fail);
}

.rsl-color-picker-swatch .contrast-badge.warn {
    background: var(--rsl-cp-warn);
}

/* Disabled/failing swatches in constrained mode */
.rsl-color-picker-swatch.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===========================================
   Custom Color Mode (Sliders)
   =========================================== */
.rsl-color-picker-custom {
    display: none;
}

.rsl-color-picker-custom.active {
    display: block;
}

/* Hue Slider */
.rsl-color-picker-slider-group {
    margin-bottom: 1rem;
}

.rsl-color-picker-slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--rsl-cp-text-muted);
}

.rsl-color-picker-slider-value {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--rsl-cp-text);
}

.rsl-color-picker-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* Hue gradient */
.rsl-color-picker-slider[data-type="hue"] {
    background: linear-gradient(to right,
        hsl(0, 100%, 50%),
        hsl(60, 100%, 50%),
        hsl(120, 100%, 50%),
        hsl(180, 100%, 50%),
        hsl(240, 100%, 50%),
        hsl(300, 100%, 50%),
        hsl(360, 100%, 50%)
    );
}

/* Saturation gradient (dynamic) */
.rsl-color-picker-slider[data-type="saturation"] {
    background: linear-gradient(to right,
        hsl(var(--current-hue, 0), 0%, 50%),
        hsl(var(--current-hue, 0), 100%, 50%)
    );
}

/* Lightness gradient (dynamic) */
.rsl-color-picker-slider[data-type="lightness"] {
    background: linear-gradient(to right,
        hsl(var(--current-hue, 0), var(--current-sat, 100%), 0%),
        hsl(var(--current-hue, 0), var(--current-sat, 100%), 50%),
        hsl(var(--current-hue, 0), var(--current-sat, 100%), 100%)
    );
}

/* Alpha/opacity gradient */
.rsl-color-picker-slider[data-type="alpha"] {
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                      linear-gradient(-45deg, #ccc 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #ccc 75%),
                      linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    position: relative;
}

.rsl-color-picker-slider[data-type="alpha"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
        transparent,
        var(--current-color, #000000)
    );
    border-radius: inherit;
    pointer-events: none;
}

/* Slider thumb */
.rsl-color-picker-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--rsl-cp-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.rsl-color-picker-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    border-color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-slider:focus::-webkit-slider-thumb {
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.3);
}

.rsl-color-picker-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--rsl-cp-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* ===========================================
   Hex Input
   =========================================== */
.rsl-color-picker-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rsl-color-picker-hex-input {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--rsl-cp-border);
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9375rem;
    color: var(--rsl-cp-text);
    background: var(--rsl-cp-bg);
    transition: all var(--rsl-cp-transition);
}

.rsl-color-picker-hex-input:focus {
    outline: none;
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.2);
}

.rsl-color-picker-hex-input.invalid {
    border-color: var(--rsl-cp-fail);
}

/* Eyedropper Button */
.rsl-color-picker-eyedropper {
    padding: 0.625rem 0.75rem;
    background: var(--rsl-cp-bg);
    border: 2px solid var(--rsl-cp-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rsl-cp-text-muted);
}

.rsl-color-picker-eyedropper:hover {
    border-color: var(--rsl-cp-border-focus);
    color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-eyedropper:focus {
    outline: none;
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.2);
}

/* ===========================================
   Preview & Contrast Section
   =========================================== */
.rsl-color-picker-preview-section {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.rsl-color-picker-preview {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.rsl-color-picker-preview-box {
    flex: 1;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.rsl-color-picker-preview-box.foreground {
    background: var(--preview-bg, #ffffff);
    color: var(--preview-color, #000000);
}

.rsl-color-picker-preview-box.background {
    background: var(--preview-color, #000000);
    color: var(--preview-bg, #ffffff);
}

/* Contrast Info */
.rsl-color-picker-contrast-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--rsl-cp-bg);
    border-radius: 6px;
    border: 1px solid var(--rsl-cp-border);
}

.rsl-color-picker-contrast-ratio {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--rsl-cp-text);
}

.rsl-color-picker-contrast-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rsl-color-picker-wcag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsl-color-picker-wcag-badge.pass {
    background: rgba(16, 185, 129, 0.15);
    color: var(--rsl-cp-pass);
}

.rsl-color-picker-wcag-badge.fail {
    background: rgba(239, 68, 68, 0.15);
    color: var(--rsl-cp-fail);
}

.rsl-color-picker-wcag-badge .icon {
    font-size: 0.625rem;
}

/* ===========================================
   Recent Colors
   =========================================== */
.rsl-color-picker-recent {
    margin-bottom: 1rem;
}

.rsl-color-picker-recent-label {
    font-size: 0.75rem;
    color: var(--rsl-cp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.rsl-color-picker-recent-swatches {
    display: flex;
    gap: 0.375rem;
}

.rsl-color-picker-recent-swatch {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
    background: var(--swatch-color);
    padding: 0;
}

.rsl-color-picker-recent-swatch:hover {
    border-color: var(--rsl-cp-border-focus);
    transform: scale(1.1);
}

.rsl-color-picker-recent-swatch:focus {
    outline: none;
    border-color: var(--rsl-cp-border-focus);
    box-shadow: 0 0 0 2px rgba(110, 123, 255, 0.3);
}

/* ===========================================
   Action Buttons
   =========================================== */
.rsl-color-picker-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rsl-cp-border);
}

.rsl-color-picker-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
    border: 2px solid transparent;
}

.rsl-color-picker-btn-primary {
    background: var(--rsl-cp-border-focus);
    color: white;
    border-color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-btn-primary:hover {
    background: #5a67d8;
    border-color: #5a67d8;
}

.rsl-color-picker-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.3);
}

.rsl-color-picker-btn-secondary {
    background: transparent;
    color: var(--rsl-cp-text-muted);
    border-color: var(--rsl-cp-border);
}

.rsl-color-picker-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--rsl-cp-text);
}

.rsl-color-picker-btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 123, 255, 0.2);
}

/* ===========================================
   Inline Mode
   =========================================== */
.rsl-color-picker[data-inline="true"] .rsl-color-picker-trigger {
    display: none;
}

.rsl-color-picker[data-inline="true"] .rsl-color-picker-dialog {
    position: relative;
    top: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--rsl-cp-border);
}

/* ===========================================
   Compact Mode
   =========================================== */
.rsl-color-picker[data-compact="true"] .rsl-color-picker-trigger {
    min-width: auto;
    padding: 0.5rem;
}

.rsl-color-picker[data-compact="true"] .rsl-color-picker-value-display,
.rsl-color-picker[data-compact="true"] .dropdown-icon {
    display: none;
}

.rsl-color-picker[data-compact="true"] .rsl-color-picker-swatch-preview {
    width: 32px;
    height: 32px;
}

/* ===========================================
   Suggestion Banner
   =========================================== */
.rsl-color-picker-suggestion {
    display: none;
    background: linear-gradient(135deg, rgba(110, 123, 255, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(110, 123, 255, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.rsl-color-picker-suggestion.visible {
    display: block;
}

.rsl-color-picker-suggestion-text {
    font-size: 0.8125rem;
    color: var(--rsl-cp-text);
    margin-bottom: 0.5rem;
}

.rsl-color-picker-suggestion-color {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--rsl-cp-bg);
    border: 1px solid var(--rsl-cp-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--rsl-cp-transition);
}

.rsl-color-picker-suggestion-color:hover {
    border-color: var(--rsl-cp-border-focus);
}

.rsl-color-picker-suggestion-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--suggestion-color);
}

/* ===========================================
   Dark Mode Support
   =========================================== */
[data-theme="dark"] {
    --rsl-cp-bg: #1a1a2e;
    --rsl-cp-border: #3d3d5c;
    --rsl-cp-border-focus: #6E7BFF;
    --rsl-cp-text: #e0e0e0;
    --rsl-cp-text-muted: #94a3b8;
    --rsl-cp-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .rsl-color-picker-tabs {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .rsl-color-picker-tab[aria-selected="true"] {
    background: var(--rsl-cp-bg);
}

[data-theme="dark"] .rsl-color-picker-preview-section {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .rsl-color-picker-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .rsl-color-picker-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .rsl-color-picker-swatch-preview {
    background-image: linear-gradient(45deg, #444 25%, transparent 25%),
                      linear-gradient(-45deg, #444 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #444 75%),
                      linear-gradient(-45deg, transparent 75%, #444 75%);
}

[data-theme="dark"] .rsl-color-picker-swatch {
    background-image: linear-gradient(45deg, #444 25%, transparent 25%),
                      linear-gradient(-45deg, #444 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #444 75%),
                      linear-gradient(-45deg, transparent 75%, #444 75%);
}

/* ===========================================
   Accessibility - Reduced Motion
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .rsl-color-picker-dialog,
    .rsl-color-picker-swatch,
    .rsl-color-picker-trigger,
    .rsl-color-picker-btn,
    .rsl-color-picker-tab {
        transition: none;
    }

    .rsl-color-picker-swatch:hover {
        transform: none;
    }

    .rsl-color-picker-trigger .dropdown-icon {
        transition: none;
    }
}

/* ===========================================
   Screen Reader Only (Visually Hidden)
   =========================================== */
.rsl-color-picker-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 480px) {
    .rsl-color-picker-dialog {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        border-radius: var(--rsl-cp-radius) var(--rsl-cp-radius) 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .rsl-color-picker-dialog.open {
        transform: translateY(0);
    }

    .rsl-color-picker-palette {
        grid-template-columns: repeat(6, 1fr);
    }

    .rsl-color-picker-preview {
        flex-direction: column;
    }
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {
    .rsl-color-picker-dialog {
        display: none !important;
    }
}
