/* ============================================================
   Rinnexa Variation Swatches – Frontend CSS
   ============================================================ */

/* Container */
.rvs-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 4px;
    align-items: center;
}

/* ── Farb-Swatches (Kreise) ── */
.rvs-swatch-color {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px var(--rvs-border, #ccc);
    transition: box-shadow 0.18s, transform 0.15s, border-color 0.18s;
    flex-shrink: 0;
}

.rvs-swatch-color:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px var(--rvs-border, #555);
}

.rvs-swatch-color.rvs-selected {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px #1a1a1a;
    transform: scale(1.08);
}

/* Tooltip */
.rvs-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}

.rvs-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.rvs-swatch-color:hover .rvs-swatch-tooltip {
    opacity: 1;
}

/* ── Button-Swatches (Text-Pills) ── */
.rvs-swatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s, background 0.15s, color 0.15s, transform 0.12s;
    user-select: none;
    line-height: 1;
}

.rvs-swatch-btn:hover {
    border-color: #374151;
    color: #111;
    transform: translateY(-1px);
}

.rvs-swatch-btn.rvs-selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #ffffff;
}

/* ── Nicht verfügbar / ausverkauft ── */
.rvs-swatch.rvs-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.rvs-swatch-btn.rvs-disabled {
    text-decoration: line-through;
    opacity: 0.4;
}

/* ── Ausgewählter Wert Label ── */
.rvs-selected-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    margin-bottom: 8px;
    display: block;
    min-height: 1.2em;
}

.rvs-selected-label strong {
    color: #111;
    font-weight: 600;
}
