/* Ring Virtual Try-On — Try On button, modal, video stage, mobile layout. */

/* Try On — visually paired with Add to Cart: same height, uppercase, no
   radius, no border, white text, flush right against the cart button.
   Uses a darker teal as a secondary action so the two buttons are
   distinguishable while staying in the same color family. */
.ring-vto-open,
.ring-vto-open.button {
    display: inline-block;
    box-sizing: border-box;
    padding: 0.85em 1.6em;
    margin: 0 0 0 4px;
    background-color: #0d8ea5;
    color: #ffffff;
    border: 0;
    border-radius: 0;
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.ring-vto-open:hover,
.ring-vto-open.button:hover,
.ring-vto-open:focus,
.ring-vto-open.button:focus {
    background-color: #0a7387;
    color: #ffffff;
    outline: none;
}

@media (max-width: 768px) {
    .ring-vto-open,
    .ring-vto-open.button {
        display: block;
        width: 100%;
        margin: 10px 0 0;
        padding: 0.95em 1.2em;
    }
}

.ring-vto-modal[hidden] {
    display: none;
}

.ring-vto-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ring-vto-dialog {
    position: relative;
    width: min(920px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.ring-vto-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #444;
}

.ring-vto-close:hover {
    color: #000;
}

.ring-vto-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #111;
}

.ring-vto-video,
.ring-vto-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.ring-vto-canvas {
    pointer-events: none;
}

.ring-vto-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 14px;
}

.ring-vto-loading[hidden] {
    display: none;
}

.ring-vto-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ring-vto-spin 0.9s linear infinite;
}

@keyframes ring-vto-spin {
    to { transform: rotate(360deg); }
}

.ring-vto-error {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fdecea;
    color: #a8160c;
    border-radius: 8px;
    font-size: 14px;
}

.ring-vto-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.ring-vto-tip {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.72;
}

@media (max-width: 768px) {
    .ring-vto-modal {
        padding: 0;
    }
    .ring-vto-dialog {
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    .ring-vto-stage {
        flex: 1 1 auto;
        aspect-ratio: auto;
    }
}
