/* Custom styles for Color Picker */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Upload area drag states */
#upload-area.dragover {
    border-color: #06b6d4 !important;
    background-color: rgba(6, 182, 212, 0.1) !important;
    transform: scale(1.01);
}

/* Canvas styling */
#image-canvas {
    image-rendering: auto;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Cursor crosshair for canvas */
#image-canvas.cursor-crosshair {
    cursor: crosshair;
}

/* Magnifier styling */
#magnifier {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #111;
}

#magnifier-grid {
    mix-blend-mode: difference;
}

/* Saved color swatches */
.saved-color-swatch {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.saved-color-swatch:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.saved-color-swatch .tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1f2937;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s;
    border: 1px solid #374151;
    z-index: 20;
}

.saved-color-swatch:hover .tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.saved-color-swatch .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    border: 2px solid #111827;
}

.saved-color-swatch:hover .remove-btn {
    opacity: 1;
}

/* Toast animation */
#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Selection disabled for UI elements */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #canvas-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    #upload-area {
        padding: 2rem;
    }
}

/* Animation for color preview */
#color-preview {
    transition: background-color 0.05s linear;
}

/* Hover effects for copy buttons */
.group:hover .copy-icon {
    color: #22d3ee;
}

/* Canvas wrapper shadow */
#canvas-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
