/* Inline Palette Selector Styles */

/* Container */
.palette-selector-inline {
    display: none;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

.palette-selector-inline.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Palette List Container */
.palette-list-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Palette Options */
.palette-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.palette-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.palette-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.palette-option.active {
    border-color: #10b981;
    background: #f0fdf4;
}

.palette-option-name {
    font-weight: 500;
    color: #374151;
}

.palette-option-count {
    font-size: 12px;
    color: #6b7280;
}

/* Preset Palettes Section */
.preset-palettes {
    margin-bottom: 20px;
}

.preset-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color Preview */
.palette-preview-inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
    gap: 4px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
    min-height: 60px;
}

.preview-color-small {
    aspect-ratio: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.preview-color-small:hover {
    transform: scale(1.2);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.preview-color-small.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Import Section */
.import-section-inline {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.import-controls-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.import-input-inline {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Button container to keep buttons together */
.import-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.import-input-inline:focus {
    outline: none;
    border-color: #10b981;
}

.btn-small {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-import {
    background: #10b981;
    color: white;
}

.btn-import:hover {
    background: #059669;
}

.btn-create {
    background: transparent;
    color: #10b981;
    border: 2px solid #10b981;
}

.btn-create:hover {
    background: #10b981;
    color: white;
}

/* All Colors Button */
.all-colors-toggle {
    width: 100%;
    padding: 10px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.all-colors-toggle:hover {
    background: #6d28d9;
}

/* Success Message Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Delete Button for Custom Palettes */
.palette-option-delete {
    margin-left: auto;
    padding: 4px 8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.palette-option:hover .palette-option-delete {
    opacity: 1;
}

.palette-option-delete:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .palette-options-grid {
        grid-template-columns: 1fr;
    }
    
    .import-controls-inline {
        flex-direction: column;
    }
    
    .import-input-inline {
        width: 100%;
    }
}