/**
 * AG212 Pizza Customizer - Frontend Styles
 * Author: Agency212.co.uk
 * Version: 1.0.0
 */

/* Ana Container */
.pizza-customizer-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.customizer-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.customizer-header h3 {
    color: #e67e22;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.customizer-header p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Seçenekler */
.customizer-options {
    margin-bottom: 25px;
}

.option-item {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-item:hover {
    border-color: #e67e22;
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.1);
    transform: translateY(-1px);
}

.option-item.selected {
    border-color: #e67e22;
    background: #fff5f0;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.15);
}

.option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-info {
    flex: 1;
    margin-right: 15px;
}

.option-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.option-description {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.option-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Fiyat Gösterimi */
.option-price .price-add {
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 4px;
}

.option-price .price-remove {
    color: #e67e22;
    font-weight: bold;
    font-size: 14px;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: #e67e22;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Özet Alanı */
.customizer-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.summary-header h4 {
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.summary-content > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    font-size: 14px;
}

.base-price {
    color: #666;
}

.options-total {
    color: #666;
}

.total-price {
    border-top: 2px solid #e67e22;
    padding-top: 10px !important;
    margin-top: 10px;
    font-size: 16px;
}

.total-price-value {
    color: #e67e22;
}

/* Butonlar */
.customizer-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.customizer-actions .button {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 120px;
}

.customizer-actions .reset-customizer {
    background: #6c757d;
    color: #fff;
}

.customizer-actions .reset-customizer:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.customizer-actions .add-to-cart-customizer {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    font-size: 16px;
    min-width: 150px;
}

.customizer-actions .add-to-cart-customizer:hover {
    background: linear-gradient(135deg, #d35400, #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.customizer-actions .add-to-cart-customizer:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .pizza-customizer-container {
        padding: 20px;
        margin: 15px 0;
    }
    
    .customizer-header h3 {
        font-size: 20px;
    }
    
    .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .option-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .customizer-actions {
        flex-direction: column;
    }
    
    .customizer-actions .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pizza-customizer-container {
        padding: 15px;
    }
    
    .customizer-header h3 {
        font-size: 18px;
    }
    
    .option-name {
        font-size: 14px;
    }
    
    .option-description {
        font-size: 12px;
    }
}

/* Loading State */
.pizza-customizer-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pizza-customizer-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e67e22;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.woocommerce-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-weight: 500;
}

/* Error Message */
.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-weight: 500;
}
