/* ==========================================================
   BEINC — R-Rated Button Component
   Two-panel button: left content (R badge + rating + label),
   right arrow panel. Dashed border swaps sides on hover,
   colours invert.

   Both panels always have 1px dashed borders on all sides.
   Visibility is controlled via border-color (transparent vs visible).
   This prevents layout jumps on hover.

   Depends on: global.css (colours, radius, guide vars, btn typography)
   ========================================================== */

/* ── WRAPPER ── */
.rr-btn {
    display: inline-flex;
    align-items: stretch;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    position: relative;
}

/* ── PANELS ── */
.rr-btn__content,
.rr-btn__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--guide-width) var(--guide-style) transparent;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── LEFT PANEL (content) — default: solid fill, no visible border ── */
.rr-btn__content {
    background: var(--color-black2);
    color: var(--color-white);
    border-radius: var(--radius) 0 0 var(--radius);
    padding: clamp(10px, 1.2vw, 16px) clamp(16px, 2vw, 28px);
    gap: clamp(10px, 1.2vw, 18px);
    border-color: var(--color-black2);
    border-right-color: transparent;
}

/* ── RIGHT PANEL (arrow) — default: dashed grey border, no fill ── */
.rr-btn__arrow {
    background: transparent;
    color: var(--color-black2);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0 clamp(12px, 1.5vw, 20px);
    border-color: var(--color-greyish);
    border-left-color: transparent;
}

/* ── R BADGE ── */
.rr-btn__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 4.5vw, 52px);
    height: clamp(36px, 4.5vw, 52px);
    background: var(--color-white);
    color: var(--color-black2);
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(20px, 2.5vw, 32px);
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── TEXT GROUP ── */
.rr-btn__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── RATING LINE (4.9 + star) ── */
.rr-btn__rating {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 6px);
    font-family: var(--font-btn);
    font-weight: var(--font-weight-btn);
    letter-spacing: var(--tracking-btn);
    font-size: clamp(13px, 1.1vw, 18px);
    line-height: 1.2;
}

.rr-btn__star {
    width: clamp(12px, 1.2vw, 18px);
    height: clamp(12px, 1.2vw, 18px);
    fill: currentColor;
    flex-shrink: 0;
}

/* ── LABEL ("Rated") ── */
.rr-btn__label {
    font-family: var(--font-btn);
    font-weight: var(--font-weight-btn);
    letter-spacing: var(--tracking-btn);
    font-size: clamp(13px, 1.1vw, 18px);
    line-height: 1.2;
}

/* ── ARROW ICON ── */
.rr-btn__icon {
    width: clamp(10px, 1.1vw, 16px);
    height: auto;
    fill: currentColor;
    transition: fill 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================
   HOVER — colours invert, dashed border swaps sides
   Only border-color changes — no border-style or border-width
   changes, so no layout shift.
   ========================================================== */
.rr-btn:hover .rr-btn__content {
    background: transparent;
    color: var(--color-black2);
    border-color: var(--color-greyish);
    border-right-color: transparent;
}

.rr-btn:hover .rr-btn__arrow {
    background: var(--color-black2);
    color: var(--color-white);
    border-color: var(--color-black2);
    border-left-color: transparent;
}

.rr-btn:hover .rr-btn__badge {
    background: var(--color-black2);
    color: var(--color-white);
    transform: scaleX(-1);
}
