/* Custom styles for thumbnail generator */

#svg-container {
    background-image: 
        repeating-conic-gradient(#f0f0f0 0% 25%, transparent 0% 50%) 
        50% / 20px 20px;
    background-color: #fafafa;
}

/* Disabled state for inputs */
input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Preview container responsive sizing */
#svg-container svg {
    width: 100%;
    height: auto;
    max-width: 640px;
    display: block;
    margin: 0 auto;
}

/* Smooth transitions for interactive elements */
input[type="range"] {
    transition: all 0.2s ease;
}

input[type="range"]:hover {
    opacity: 0.8;
}

/* Better file input styling */
input[type="file"] {
    font-size: 14px;
}

/* Gradient preview helper */
.gradient-preview {
    background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-middle) 60%, var(--grad-end) 100%);
}

/* Icon preview in select */
#iconType option {
    padding: 8px;
}

/* Sticky positioning for Safari support */
@supports (-webkit-appearance: none) {
    .sticky {
        position: -webkit-sticky;
    }
}

/* Collapsible color controls */
#colorControls {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#colorControls.collapsed {
    max-height: 0;
}

/* Chevron rotation */
#colorSchemeChevron.rotated {
    transform: rotate(-90deg);
}

/* Interactive elements */
.interactive-element {
    transition: all 0.2s ease;
}

.interactive-element:hover {
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.interactive-element.selected {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* SVG Container */
#svg-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#svg-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Actual size modal */
#actualSizeModal {
    backdrop-filter: blur(4px);
}

#actualSizeContainer {
    background-image: 
        repeating-conic-gradient(#f0f0f0 0% 25%, transparent 0% 50%) 
        50% / 20px 20px;
    background-color: #fafafa;
}

/* Modal animations */
#actualSizeModal:not(.hidden) {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Icon picker */
#iconPicker {
    transition: all 0.2s ease-out;
}

#iconPicker:not(.hidden) {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px);
        max-height: 0;
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
        max-height: 240px;
    }
}

/* Icon grid buttons */
#iconGrid button {
    transition: all 0.15s ease;
}

#iconGrid button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#iconGrid button.selected {
    background-color: #3b82f6;
    border-color: #2563eb;
}

#iconGrid button.selected svg {
    stroke: white;
}

/* Tab system */
.tab-button {
    transition: all 0.2s ease;
    cursor: pointer;
}

.tab-button:hover {
    color: #374151;
    border-color: #d1d5db;
}

.tab-button.active {
    color: #2563eb;
    border-color: #2563eb;
}

/* Icon grids */
.icon-grid button {
    transition: all 0.15s ease;
}

.icon-grid button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}