/**
 * Clever Elements - Product Attributes widget.
 *
 * DaiscomIA 2026-09-25: swatches de color y estados de opciones deshabilitadas.
 */

.elementor-product-attributes .ce-attr-group {
    margin-bottom: 10px;
}

.elementor-product-attributes .ce-attr-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.elementor-product-attributes .ce-attr-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Dropdown: aspecto base (los controles de estilo del panel lo sobreescriben). */
.elementor-product-attributes .ce-attr-select {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 9px 34px 9px 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23777' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid #d0d0d5;
    border-radius: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.elementor-product-attributes .ce-attr-select:hover {
    border-color: #b3b3bb;
}

.elementor-product-attributes .ce-attr-select:focus {
    outline: none;
    border-color: #7a7a85;
    box-shadow: 0 0 0 3px rgba(122, 122, 133, 0.15);
}

.elementor-product-attributes .ce-attr-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f3f3f5;
}

.elementor-product-attributes .ce-attr-select option:disabled {
    color: #aaa;
}

/* Radio buttons: por defecto uno debajo del otro (lista vertical).
   La variante inline la activa la clase ce-radio-inline del control
   "Radio Layout" (prefix_class). */
.elementor-product-attributes .ce-attr-radio {
    display: block;
    margin-bottom: 6px;
    line-height: 1.5;
    cursor: pointer;
}

.elementor-product-attributes .ce-attr-radio input {
    margin-right: 6px;
    vertical-align: middle;
    cursor: pointer;
}

.elementor-product-attributes .ce-attr-radio span {
    vertical-align: middle;
}

.ce-radio-inline .elementor-product-attributes .ce-attr-radio {
    display: inline-block;
    margin: 0 14px 6px 0;
}

.elementor-product-attributes .ce-attr-swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.elementor-product-attributes .ce-attr-swatch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.elementor-product-attributes .ce-swatch-box {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    border: 2px solid #ddd;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2px #fff;
}

.elementor-product-attributes .ce-swatch-label {
    margin-left: 6px;
}

.elementor-product-attributes .ce-attr-swatch input:checked ~ .ce-swatch-box {
    border-color: #333;
}

.elementor-product-attributes .ce-attr-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.elementor-product-attributes .ce-attr-disabled .ce-swatch-box {
    box-shadow: none;
}

.elementor-product-attributes option.ce-attr-disabled {
    color: #aaa;
}

/* Diagnostico visible solo en el editor cuando no hay atributos. */
.ce-attrs-debug {
    padding: 8px 10px;
    border: 1px dashed #e53935;
    background: #fdecea;
    color: #b71c1c;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-all;
}
