/**
 * Custom Product Options - Simple Horizontal Button Design
 * Primary Color: #000000 (pitch black)
 */

/* ===== Variables ===== */
:root {
    --cpo-primary: #000000;
    --cpo-primary-hover: #333333;
    --cpo-border: #d1d5db;
    --cpo-bg: #ffffff;
    --cpo-text: #333333;
    --cpo-error: #dc2626;
    --cpo-radius: 4px;
}

/* ===== Simple Options Container ===== */
.cpo-options-simple {
    margin: 15px 0 20px 0;
    font-family: inherit;
}

/* ===== Size/Unit Buttons - Horizontal Pill Style ===== */
.cpo-size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cpo-size-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #f9f9f9;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #555;
    min-width: 130px;
    height: 35px;
    box-sizing: border-box;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.06em;
}

.cpo-size-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cpo-size-btn:hover {
    border-color: #B79F8A;
    background: #f5f5f5;
}

.cpo-size-btn.selected,
.cpo-size-btn:has(input:checked) {
    color: #fff;
    border: 1px solid #B79F8A;
    background: linear-gradient(180deg, #C8B6A6 0%, #B79F8A 45%, #A98F79 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cpo-size-btn span {
    pointer-events: none;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* ===== Option Row ===== */
.cpo-option-row {
    margin-bottom: 12px;
}

.cpo-option-row:last-child {
    margin-bottom: 0;
}

/* ===== Color Buttons ===== */
.cpo-color-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cpo-color-btn {
    position: relative;
    cursor: pointer;
}

.cpo-color-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cpo-color-circle {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--cpo-border);
    transition: all 0.15s ease;
}

.cpo-color-btn:hover .cpo-color-circle {
    border-color: var(--cpo-primary-hover);
    transform: scale(1.05);
}

.cpo-color-btn.selected .cpo-color-circle,
.cpo-color-btn:has(input:checked) .cpo-color-circle {
    border-color: var(--cpo-primary);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cpo-primary);
}

/* ===== Error State ===== */
.cpo-option-row.cpo-error .cpo-size-buttons,
.cpo-option-row.cpo-error .cpo-color-buttons,
.cpo-options-simple.cpo-error .cpo-size-buttons {
    outline: 2px solid var(--cpo-error);
    outline-offset: 4px;
    border-radius: var(--cpo-radius);
}

/* ===== Validation Message ===== */
.cpo-validation-message {
    background: #fef2f2;
    color: var(--cpo-error);
    padding: 10px 15px;
    font-size: 13px;
    margin-bottom: 10px;
    border-radius: var(--cpo-radius);
    border: 1px solid #fecaca;
}

/* ===== Main Price Wrapper (for JS updates) ===== */
.cpo-main-price {
    display: inline;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .cpo-size-buttons {
        gap: 6px;
    }
    
    .cpo-size-btn {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 70px;
    }
}
