/* WC Custom Add-Ons — Frontend Styles */

.wcca-addons-wrap {
    margin: 20px 0 16px;
}

/* Group container */
.wcca-group {
    margin-bottom: 22px;
    padding: 14px 18px;
    background: #fffdf5;
    border: 1px solid #e8e0cc;
    border-radius: 10px;
}

.wcca-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wcca-group-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.wcca-required { color: #e00; margin-left: 2px; }

.wcca-qty-counter {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #eee;
    padding: 2px 10px;
    border-radius: 20px;
}

/* Options list */
.wcca-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Checkbox & Radio ── */
.wcca-type-checkbox .wcca-option,
.wcca-type-radio .wcca-option {
    border-radius: 8px;
    transition: background 0.15s;
}

.wcca-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.wcca-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.wcca-label input[type=checkbox]:checked ~ *,
.wcca-label input[type=radio]:checked ~ * {
    color: #0073aa;
}

.wcca-label input[type=checkbox],
.wcca-label input[type=radio] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.wcca-option-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.wcca-price {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* ── Number ── */
.wcca-type-number .wcca-option {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 4px 2px;
    transition: background 0.15s;
}

.wcca-type-number .wcca-option:hover {
    background: #fafafa;
}

.wcca-number-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
}

.wcca-number-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.wcca-number-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcca-num-display {
    min-width: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.wcca-num-btn {
    width: 34px;
    height: 34px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    color: #555;
    font-weight: 300;
}

.wcca-num-btn:hover:not(:disabled) {
    background: #c8102e;
    color: #fff;
    border-color: #c8102e;
}

.wcca-num-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.wcca-num-input {
    display: none !important;
}

/* ── Text ── */
.wcca-text-row { display: flex; flex-direction: column; gap: 4px; }
.wcca-text-label { font-size: 14px; font-weight: 500; }
.wcca-text-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* ── Swatch ── */
.wcca-type-swatch .wcca-options {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.wcca-swatch-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.wcca-swatch-input { display: none; }

.wcca-swatch {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #ddd;
    background-size: cover;
    background-position: center;
    transition: border-color 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    background-color: #eee;
}

.wcca-swatch-input:checked ~ .wcca-swatch,
.wcca-swatch.wcca-swatch-active {
    border-color: #0073aa;
    transform: scale(1.12);
    box-shadow: 0 0 0 3px rgba(0,115,170,0.2);
}

.wcca-swatch-label:hover .wcca-swatch {
    border-color: #0073aa;
}

.wcca-swatch-name {
    font-size: 11px;
    text-align: center;
    color: #555;
    max-width: 65px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .wcca-group { padding: 10px 12px; }
    .wcca-number-row { flex-wrap: wrap; }
}

/* Min qty warning */
.wcca-qty-counter.wcca-qty-below-min {
    color: #dc2626;
    font-weight: 600;
}
.wcca-qty-counter.wcca-qty-below-min::after {
    content: ' (min required)';
    font-size: 11px;
    font-weight: 400;
}

/* Add to Cart disabled by min qty */
.single_add_to_cart_button.wcca-min-disabled,
.single_add_to_cart_button.wcca-min-disabled:hover {
    opacity: 0.5;
    cursor: not-allowed !important;
}
