/**
 * Стили для интерактивных селектов вариаций
 */

/* Базовые стили для селектов */
.qp-variation-select {
    width: 100%;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.qp-variation-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.qp-variation-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Стрелочка селекта */
.qp-variation-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Опции в темной теме */
.qp-variation-select option {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 8px;
}

/* Индикатор загрузки цены */
.qp-loading-price {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.qp-loading-price::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -24px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: qp-spin 0.8s linear infinite;
}

@keyframes qp-spin {
    to { transform: rotate(360deg); }
}

/* Анимация изменения цены */
.woocommerce-Price-amount.amount {
    transition: opacity 0.2s ease;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .qp-variation-select {
        font-size: 13px;
        padding: 6px 10px;
        padding-right: 30px;
    }
    
    .qp-variation-select {
        background-size: 14px;
        background-position: right 6px center;
    }
}

/* Улучшенная читаемость для длинных названий */
.qp-variation-select option {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Hover эффект для опций (поддерживается не везде) */
.qp-variation-select option:hover {
    background-color: rgba(139, 92, 246, 0.2);
}
