/**
 * Color Picker Styles - Swedish Version
 * Color Picker Dedicated Styles
 *
 * @package Zipper
 */

/* Main Layout */
.picker-main-section {
    margin-bottom: 24px;
}

.picker-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.picker-left {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.picker-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Section Label */
.section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
}

.section-label i {
    color: #d4af37;
}

/* Color Wheel Section */
.color-wheel-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.color-wheel-section:hover {
    border-color: #d4c9a8;
}

.color-wheel-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.color-wheel-container canvas {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    cursor: crosshair;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Saturation/Lightness Section */
.sl-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sl-section:hover {
    border-color: #d4c9a8;
}

.sl-container {
    position: relative;
    width: 100%;
    height: 160px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sl-container canvas {
    width: 100%;
    height: 160px;
    cursor: crosshair;
}

/* Alpha (Opacity) Section */
.alpha-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.alpha-section:hover {
    border-color: #d4c9a8;
}

.alpha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.alpha-header .section-label {
    margin-bottom: 0;
}

.alpha-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #d4af37;
    padding: 4px 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e8e4dc;
}

.alpha-slider-container {
    position: relative;
    height: 28px;
    border-radius: 14px;
    background: repeating-conic-gradient(#e8e4dc 0% 25%, #fff 0% 50%) 50% / 12px 12px;
    overflow: hidden;
}

.alpha-slider {
    width: 100%;
    height: 28px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, transparent, #d4af37);
    border-radius: 14px;
    cursor: pointer;
    position: relative;
}

.alpha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s;
}

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

.alpha-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Preview Section */
.preview-section {
    margin-bottom: 0;
}

.preview-box {
    height: 140px;
    border-radius: 16px;
    border: 1px solid #e8e4dc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
    transition: box-shadow 0.3s;
}

.preview-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.preview-color-text {
    font-size: 18px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: #2d2a26;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Consolas', 'Monaco', monospace;
    z-index: 1;
}

/* EyeDropper Section */
.eyedropper-section {
    margin-bottom: 0;
}

.eyedropper-btn {
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.eyedropper-btn i {
    font-size: 18px;
    color: #d4af37;
}

.eyedropper-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
    background: #fffcf5;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.eyedropper-btn:active {
    transform: scale(0.98);
}

.eyedropper-unsupported {
    margin-top: 8px;
    font-size: 12px;
    color: #8c8579;
    text-align: center;
}

/* Color Values Input Section */
.color-values-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.value-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.value-card:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.value-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.value-label {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.value-label i {
    color: #d4af37;
    font-size: 16px;
}

.copy-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 12px;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    background: #fffcf5;
    border-color: #d4af37;
    color: #d4af37;
}

/* HEX Input */
.value-input-wrapper {
    display: flex;
    align-items: center;
}

.hex-wrapper {
    position: relative;
    flex: 1;
}

.hex-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #8c8579;
    z-index: 1;
}

.hex-input {
    width: 100%;
    padding: 12px 12px 12px 28px !important;
    border: 1px solid #e8e4dc !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.value-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    background: #fff;
    transition: border-color 0.2s;
}

.value-input:focus {
    outline: none;
    border-color: #d4af37;
}

/* RGB/HSL Input Groups */
.rgb-inputs,
.hsl-inputs {
    display: flex;
    gap: 8px;
}

.rgb-group,
.hsl-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rgb-group label,
.hsl-group label {
    font-size: 11px;
    font-weight: 600;
    color: #8c8579;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rgb-group .value-input,
.hsl-group .value-input {
    text-align: center;
    padding: 10px 8px;
}

/* CSS Code Section */
.css-code-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}

.css-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e8e4dc;
    background: #fff;
}

.css-tabs {
    display: flex;
    gap: 4px;
}

.css-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
}

.css-tab:hover {
    background: #faf9f7;
    color: #d4af37;
}

.css-tab.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
}

.copy-css-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-css-btn:hover {
    background: #fffcf5;
    border-color: #d4af37;
    color: #d4af37;
}

.css-code-body {
    padding: 16px;
}

.css-code-display {
    display: block;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    color: #2d2a26;
    background: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
    word-break: break-all;
}

.css-code-display .property {
    color: #0550ae;
}

.css-code-display .value {
    color: #d4af37;
    font-weight: 600;
}

/* Harmony Colors Section */
.harmony-section {
    margin-bottom: 0;
}

.harmony-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.harmony-title i {
    color: #d4af37;
}

.harmony-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.harmony-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.harmony-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.harmony-card-header {
    margin-bottom: 12px;
}

.harmony-name {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.harmony-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.harmony-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #e8e4dc;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.harmony-swatch:hover {
    transform: scale(1.1);
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.harmony-swatch::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #2d2a26;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    font-family: 'Consolas', 'Monaco', monospace;
    z-index: 100;
}

.harmony-swatch:hover::after {
    opacity: 1;
    visibility: visible;
}

/* History Section */
.history-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.history-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.history-title i {
    color: #d4af37;
}

.clear-history-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 12px;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-history-btn:hover {
    background: #fff;
    border-color: #dc3232;
    color: #dc3232;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 48px;
}

.history-item {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #e8e4dc;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
}

.history-item:hover {
    transform: scale(1.1);
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-item::after {
    content: attr(data-hex);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #2d2a26;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    font-family: 'Consolas', 'Monaco', monospace;
    z-index: 100;
}

.history-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.history-empty {
    width: 100%;
    padding: 20px;
    text-align: center;
    color: #8c8579;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 992px) {
    .picker-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .picker-left {
        flex: none;
        width: 100%;
    }

    .picker-right {
        width: 100%;
    }

    .color-wheel-container {
        max-width: 220px;
    }

    .harmony-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .picker-layout {
        gap: 16px;
    }

    .picker-left {
        gap: 12px;
    }

    .color-wheel-section,
    .sl-section,
    .alpha-section {
        padding: 14px;
    }

    .color-wheel-container {
        width: 100%;
        height: auto;
        max-width: 200px;
    }

    .color-wheel-container canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .sl-container {
        height: 140px;
    }

    .sl-container canvas {
        height: 140px;
    }

    .preview-box {
        height: 120px;
    }

    .css-code-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .css-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .copy-css-btn {
        justify-content: center;
    }

    .value-card {
        padding: 14px;
    }

    .harmony-grid {
        gap: 12px;
    }

    .harmony-card {
        padding: 14px;
    }

    .harmony-swatch {
        width: 36px;
        height: 36px;
    }

    .history-item {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .section-label {
        font-size: 13px;
    }

    .value-card {
        padding: 12px;
    }

    .value-header {
        margin-bottom: 10px;
    }

    .value-label {
        font-size: 13px;
    }

    .rgb-inputs,
    .hsl-inputs {
        gap: 6px;
    }

    .rgb-group .value-input,
    .hsl-group .value-input {
        padding: 8px 4px;
        font-size: 13px;
    }

    .css-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .css-code-display {
        font-size: 13px;
        padding: 12px;
    }

    .harmony-card {
        padding: 12px;
    }

    .harmony-card-header {
        margin-bottom: 10px;
    }

    .harmony-name {
        font-size: 13px;
    }

    .harmony-swatch {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .history-section {
        padding: 14px;
    }

    .history-item {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
}
