/**
 * RPS Coachmarks — hide/reveal selector + floating tooltip guidance
 */

#rps-zone-selector.rps-state-hidden {
    display: none !important;
}

#rps-zone-selector.rps-state-revealing {
    animation: rpsSelectorReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rpsSelectorReveal {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

.rps-coach-target {
    position: relative;
    animation: rpsCoachGlow 1.8s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes rpsCoachGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(43, 182, 209, 0.55); }
    50%      { box-shadow: 0 0 0 8px rgba(43, 182, 209, 0); }
}

.rps-coach {
    position: absolute;
    background: #0f172a;
    color: #fff;
    padding: 10px 42px 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    max-width: 280px;
    line-height: 1.4;
    pointer-events: auto;
    animation: rpsCoachIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

@keyframes rpsCoachIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rps-coach::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    left: 18px;
}

.rps-coach[data-arrow="top"]::after {
    top: -14px;
    border-bottom-color: #0f172a;
}

.rps-coach[data-arrow="bottom"]::after {
    bottom: -14px;
    border-top-color: #0f172a;
}

.rps-coach__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #2bb6d1;
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.rps-coach__text {
    vertical-align: middle;
    text-transform: capitalize;
}

.rps-coach__close {
    all: unset;
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}

.rps-coach__close:hover,
.rps-coach__close:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

@media (max-width: 600px) {
    .rps-coach {
        max-width: calc(100vw - 32px);
        font-size: 12.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rps-coach-target { animation: none; }
    .rps-coach        { animation: none; }
    #rps-zone-selector.rps-state-revealing { animation: none; }
}

/* Smart-hide: auto-hidden variation rows */
form.variations_form table.variations tr.rps-auto-hidden {
    display: none !important;
}

/* Foil Type row reveal animation */
form.variations_form table.variations tr.rps-foil-type-row {
    transition: opacity 0.3s ease;
}
form.variations_form table.variations tr.rps-foil-type-row.rps-foil-active {
    animation: rpsFoilReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rpsFoilReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Foil Type select inherits theme styling via .haru-variation-select-box */
form.variations_form table.variations tr.rps-foil-type-row td.label label {
    font-weight: inherit;
}
