/**
 * WP Topping Manager - Frontend Styles v3
 * Layout matching Image 2 design
 */

/* Topping Selector Wrapper */
.topping-selector-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

/* Header */
.topping-selector-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.topping-selector-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.topping-selector-subtitle {
    margin: 0;
    font-size: 13px;
    color: #646970;
}

/* Topping List */
.topping-selector-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Topping Item - Layout như Image 2 */
.topping-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s;
}

.topping-item:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.topping-item.topping-selected {
    background: #f0f8ff;
    border-color: #2271b1;
}

/* Checkbox */
.topping-checkbox {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    cursor: pointer;
    flex-shrink: 0;
}

/* Image */
.topping-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.topping-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details Container */
.topping-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Header: Name + Price */
.topping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topping-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.topping-price {
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
    white-space: nowrap;
}

/* Footer: Qty Label + Quantity Selector */
.topping-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topping-qty-label {
    font-size: 12px;
    color: #646970;
}

/* Quantity Selector - VỊ TRÍ MÔ TẢ */
.topping-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.qty-btn {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.qty-btn:hover:not(:disabled) {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.qty-btn:disabled {
    background: #f5f5f5;
    border-color: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.qty-input {
    width: 28px;
    height: 18px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    background: #fff;
    padding: 0;
}

.qty-input:focus {
    outline: none;
    border-color: #2271b1;
}

.qty-input:disabled {
    background: #f5f5f5;
    color: #999;
}

/* Total Price */
.topping-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.topping-total-label {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.topping-total-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    display: none;
}

.original-price.show {
    display: block;
}

.total-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .topping-selector-wrapper {
        padding: 15px;
        margin: 15px 0;
    }
    
    .topping-item {
        padding: 10px;
        gap: 10px;
    }
    
    .topping-image {
        width: 45px;
        height: 45px;
    }
    
    .topping-name {
        font-size: 13px;
    }
    
    .topping-price {
        font-size: 15px;
    }
    
    .topping-qty-label {
        font-size: 11px;
    }
    
    .qty-btn {
        width: 18px;
        height: 18px;
        font-size: 13px;
    }
    
    .qty-input {
        width: 28px;
        height: 18px;
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .topping-footer {
        flex-wrap: wrap;
    }
    
    .topping-quantity {
        width: 100%;
        justify-content: flex-end;
    }
}
