/* Azuro — variation pill swatches (front-end only). Buttons are rendered
   server-side (see functions.php); the native <select> is hidden from the
   first paint so there is no flash. */

.variations_form .variations select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Stack the attribute label ABOVE the buttons (desktop + mobile). */
.variations_form table.variations,
.variations_form table.variations tbody,
.variations_form table.variations tr {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
}

.variations_form table.variations th.label,
.variations_form table.variations td.value {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    text-align: right !important;
}

.variations_form table.variations th.label {
    margin: 0 0 6px 0 !important;
}

.variations_form table.variations th.label label {
    display: inline-block;
    margin: 0;
    font-weight: 500;
}

/* The swatch buttons — high specificity + !important so theme/Elementor
   button styles cannot inflate the size. */
.variations_form .az-swatches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    justify-content: flex-start !important;
}

.variations_form .az-swatches .az-swatch {
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 12px !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    text-transform: none !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.variations_form .az-swatches .az-swatch:hover {
    border-color: #111 !important;
}

.variations_form .az-swatches .az-swatch:focus-visible {
    outline: 2px solid #111 !important;
    outline-offset: 2px;
}

.variations_form .az-swatches .az-swatch.is-selected {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

.variations_form .az-swatches .az-swatch.is-disabled {
    opacity: .4 !important;
    cursor: not-allowed !important;
    text-decoration: line-through !important;
    border-style: dashed !important;
}

@media (max-width: 480px) {
    .variations_form .az-swatches { gap: 6px !important; }
    .variations_form .az-swatches .az-swatch {
        padding: 5px 10px !important;
        font-size: 10px !important;
    }
}
