/* Style Selector */
.style-selector {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.style-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.style-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.style-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
    flex-grow: 1;
    margin-left: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style Search */
.style-search {
    margin-bottom: 1rem;
}

#style-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

#style-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.style-search-results {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.style-categories {
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.style-categories::-webkit-scrollbar {
    width: 8px;
}

.style-categories::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 4px;
}

.style-categories::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.style-categories::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.style-category {
    margin-bottom: 1rem;
}

.style-category h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.style-option {
    position: relative;
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 120px;
}

.style-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.style-option label {
    display: block;
    padding: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.style-option input[type="checkbox"]:checked + label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.style-option:hover label {
    border-color: var(--primary-color);
}

.style-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .style-option {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .style-option {
        flex: 1 1 100%;
    }
}

/* Dark mode adjustments */
.dark-mode .style-selector {
    background: var(--card-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .style-option label {
    background: var(--input-bg);
    border-color: var(--border-color);
}

.dark-mode .style-option input[type="checkbox"]:checked + label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dark-mode .style-actions {
    border-top-color: var(--border-color);
}
