/* Contenedor propio: fuerza que la etiqueta y los swatches queden en bloque
   (uno debajo del otro), sin importar si el tema pone el <select> original
   dentro de un flex-row junto al link "Clear" de WooCommerce. */
.vry-bd-group {
    display: block;
    width: 100%;
}

.vry-bd-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 4px 0;
}

/* ---- Círculos de color ---- */
.vry-bd-colors .vry-bd-swatch {
    width: var(--vry-bd-size, 40px);
    height: var(--vry-bd-size, 40px);
    padding: 0;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    position: relative;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    box-shadow: inset 0 0 0 2px #fff;
}
.vry-bd-shape-rounded { border-radius: 10px; }
.vry-bd-shape-square { border-radius: 2px; }
.vry-bd-shape-pill { border-radius: 50%; }

/* ---- Bicolor (dos tonos en diagonal) ---- */
.vry-bd-dual { position: relative; }
.vry-bd-dual::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
    pointer-events: none;
}

/* ---- Efecto vidrio / "liquid glass" (para colores transparentes tipo
   Crystal): brillo esmerilado en vez de un color plano. ---- */
.vry-bd-glass {
    background-image:
        linear-gradient(135deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.15) 35%, rgba(255,255,255,.35) 60%, rgba(255,255,255,.05) 100%) !important;
    background-blend-mode: overlay;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.65) !important;
    box-shadow:
        inset 0 2px 5px rgba(255,255,255,.75),
        inset 0 -4px 8px rgba(0,0,0,.08),
        0 3px 8px rgba(0,0,0,.10) !important;
}
.vry-bd-glass::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 14%;
    width: 32%;
    height: 22%;
    border-radius: 50%;
    background: rgba(255,255,255,.8);
    filter: blur(2px);
    pointer-events: none;
}

.vry-bd-colors .vry-bd-swatch.vry-bd-light-swatch { border-color: #d1d5db; }

.vry-bd-colors .vry-bd-swatch:hover:not(.vry-bd-disabled) { transform: translateY(-2px); }
.vry-bd-colors .vry-bd-swatch.vry-bd-active {
    border-color: var(--vry-bd-active, #16a34a);
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--vry-bd-active, #16a34a);
}
.vry-bd-colors .vry-bd-swatch.vry-bd-active::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    font-size: 14px;
    font-weight: 700;
}
.vry-bd-colors .vry-bd-swatch.vry-bd-light-swatch.vry-bd-active::after { color: #111827; text-shadow: none; }

.vry-bd-colors .vry-bd-swatch.vry-bd-disabled {
    opacity: .28;
    cursor: not-allowed;
    position: relative;
}
.vry-bd-colors .vry-bd-swatch.vry-bd-disabled::before {
    content: "";
    position: absolute;
    left: 10%; right: 10%; top: 50%;
    height: 2px;
    background: currentColor;
    color: #ef4444;
    transform: rotate(-45deg);
}

/* ---- Botones de texto (talla, micrófono, etc.) ---- */
.vry-bd-buttons .vry-bd-swatch.vry-bd-pill {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.vry-bd-buttons.vry-bd-shape-rounded .vry-bd-swatch.vry-bd-pill,
.vry-bd-buttons .vry-bd-swatch.vry-bd-pill { border-radius: 8px; }

.vry-bd-buttons .vry-bd-swatch.vry-bd-pill:hover:not(.vry-bd-disabled) { border-color: var(--vry-bd-active, #16a34a); transform: translateY(-1px); }
.vry-bd-buttons .vry-bd-swatch.vry-bd-pill.vry-bd-active {
    border-color: var(--vry-bd-active, #16a34a);
    background: var(--vry-bd-active, #16a34a);
    color: #fff;
}
.vry-bd-buttons .vry-bd-swatch.vry-bd-pill.vry-bd-disabled {
    opacity: .4;
    cursor: not-allowed;
    text-decoration: line-through;
}

@media (max-width: 480px) {
    .vry-bd-colors .vry-bd-swatch { width: 34px; height: 34px; }
    .vry-bd-buttons .vry-bd-swatch.vry-bd-pill { padding: 7px 14px; font-size: 12px; }
}

/* ---- Etiqueta de "qué está elegido" ---- */
.vry-bd-selected-label {
    display: block;
    width: 100%;
    margin: 2px 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    transition: color .15s ease;
}

/* ---- Animación al elegir (breve "pop") ---- */
.vry-bd-swatch.vry-bd-pop { animation: vryBdPop .22s ease; }
@keyframes vryBdPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.14); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .vry-bd-swatch.vry-bd-pop { animation: none; }
}
