/**
 * WooCommerce 變化選擇器按鈕版 - 前台樣式
 * 實現左邊文字右邊價格的按鈕式佈局
 */

/* 隱藏原始的下拉選單 */
.wc-variation-button-selector + select {
    display: none !important;
}

/* 變化選擇器容器 */
.wc-variation-button-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

/* 單個變化按鈕 */
.variation-button {
    position: relative;
    width: 100%;
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

/* 按鈕標籤 */
.variation-button-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    width: 100%;
    min-height: 60px;
    position: relative;
    box-sizing: border-box;
}

/* 變化文字（左邊） */
.variation-text {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    flex: 1;
    text-align: left;
}

/* 變化價格（右邊） */
.variation-price {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    text-align: right;
    flex-shrink: 0;
    margin-left: 15px;
}

/* 選中狀態 */
.variation-button.selected {
    border: 1px solid #ff6b35;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.variation-button.selected .variation-button-label {
    background: #ffffff;
}

.variation-button.selected .variation-text {
    color: #ff6b35;
}

.variation-button.selected .variation-price {
    color: #ff6b35;
}

/* 懸停效果 */
.variation-button:hover:not(.selected) {
    border: 1px solid #ff6b35;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.variation-button:hover:not(.selected) .variation-text {
    color: #ff6b35;
}

.variation-button:hover:not(.selected) .variation-price {
    color: #ff6b35;
}

/* 禁用狀態 */
.variation-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.variation-button.disabled .variation-button-label {
    cursor: not-allowed;
}

.variation-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 促銷/特價樣式 */
.variation-button.promotion {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8e0 100%);
}

.variation-button.promotion .variation-price {
    color: #ff6b35;
}

.variation-button.promotion.selected {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

.variation-button.promotion.selected .variation-price {
    color: #ffd700;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .variation-button-label {
        padding: 14px 16px;
        min-height: 55px;
    }
    
    .variation-text {
        font-size: 15px;
    }
    
    .variation-price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wc-variation-button-selector {
        gap: 10px;
    }
    
    .variation-button-label {
        padding: 12px 14px;
        min-height: 50px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .variation-text {
        font-size: 14px;
        text-align: left;
    }
    
    .variation-price {
        font-size: 15px;
        text-align: left;
        margin-left: 0;
    }
}

/* 深色主題支援 */
@media (prefers-color-scheme: dark) {
    .variation-button {
        border-color: #404040;
        background: #2a2a2a;
    }
    
    .variation-text {
        color: #e0e0e0;
    }
    
    .variation-price {
        color: #4fc3f7;
    }
    
    .variation-button:hover:not(.selected) {
        border-color: #4fc3f7;
        background: #2a2a2a;
    }
    
    .variation-button:hover:not(.selected) .variation-text {
        color: #4fc3f7;
    }
    
    .variation-button:hover:not(.selected) .variation-price {
        color: #4fc3f7;
    }
}

/* 動畫效果 */
@keyframes buttonSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.variation-button.selected {
    animation: buttonSelect 0.3s ease;
}

/* 載入狀態 */
.variation-button.loading .variation-price {
    opacity: 0.6;
    position: relative;
}

.variation-button.loading .variation-price::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 12px;
    height: 12px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* 特殊效果：漸變邊框 */
.variation-button.gradient-border {
    position: relative;
    background: white;
}

.variation-button.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(45deg, #007cba, #ff6b35, #28a745);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.variation-button.gradient-border:hover::before {
    opacity: 1;
}

/* 移除圖標 - 不需要任何圖標 */
