/**
 * ===============================================================
 * MAYO VIRTUAL STUDIO (LUCY DECART AI VTO) STYLESHEET
 * Luxury Minimalist Streetwear Design System
 * ===============================================================
 */

:root {
    --vto-bg-overlay: rgba(10, 10, 10, 0.88);
    --vto-card-bg: #141414;
    --vto-surface: #1c1c1c;
    --vto-border: rgba(255, 255, 255, 0.12);
    --vto-text: #fdfcf5;
    --vto-text-muted: #8e8e8e;
    --vto-accent: #ffffff;
}

/* "Try It On" Launch Button in Product Page */
.btn-vto-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem 1.4rem;
    background: transparent;
    color: var(--color-text, #fdfcf5);
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.3));
    border-radius: 4px;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-vto-launch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.btn-vto-launch:hover::before {
    left: 100%;
}

.btn-vto-launch:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-text, #ffffff);
    transform: translateY(-1px);
}

.btn-vto-launch svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-vto-launch:hover svg {
    transform: scale(1.15) rotate(5deg);
}

/* VTO Modal Overlay */
.vto-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--vto-bg-overlay);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.vto-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Window */
.vto-modal-window {
    width: 100%;
    max-width: 1080px;
    max-height: 92vh;
    background: var(--vto-card-bg);
    border: 1px solid var(--vto-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.08);
    transform: scale(0.96) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.vto-modal-overlay.active .vto-modal-window {
    transform: scale(1) translateY(0);
}

/* Header */
.vto-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--vto-border);
    background: rgba(20, 20, 20, 0.95);
}

.vto-brand-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vto-brand-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--vto-text);
    text-transform: uppercase;
}

.vto-powered-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--vto-text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
}

.vto-close-btn {
    background: none;
    border: none;
    color: var(--vto-text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s, transform 0.2s;
}

.vto-close-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* Body Layout */
.vto-modal-body {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    overflow-y: auto;
    flex: 1;
}

/* Left: Viewport Area */
.vto-viewport-pane {
    position: relative;
    background: #080808;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    border-right: 1px solid var(--vto-border);
    padding: 1.5rem;
}

.vto-canvas-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 520px;
    border-radius: 6px;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vto-video-feed,
.vto-image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #0b0b0b;
    display: block;
}

/* Silhouette Framing Guide Overlay */
.vto-frame-guide {
    position: absolute;
    inset: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    box-sizing: border-box;
}

.vto-frame-hint {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.65);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    color: #fdfcf5;
    text-transform: uppercase;
}

/* Live AR Canvas & Real-Time Fit Controls */
.vto-live-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #0b0b0b;
    display: block;
}

.vto-live-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 6;
    backdrop-filter: blur(8px);
}

.vto-live-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: vto-pulse 1.2s infinite ease-in-out;
}

@keyframes vto-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.vto-live-fit-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 14, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    z-index: 6;
    backdrop-filter: blur(8px);
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    white-space: nowrap;
}

.vto-fit-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    user-select: none;
}

.vto-fit-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* Viewport Action Controls */
.vto-viewport-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 440px;
    justify-content: center;
}

.vto-icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vto-border);
    color: var(--vto-text);
    padding: 0.65rem 1rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.vto-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

/* Right: Settings & Details Pane */
.vto-controls-pane {
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--vto-card-bg);
}

/* Mode Selection Tabs */
.vto-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: var(--vto-surface);
    padding: 0.35rem;
    border-radius: 6px;
    margin-bottom: 1.75rem;
    border: 1px solid var(--vto-border);
}

.vto-mode-btn {
    background: transparent;
    border: none;
    color: var(--vto-text-muted);
    font-family: 'Syne', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.vto-mode-btn.active {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Product Info Card in VTO */
.vto-garment-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem;
    background: var(--vto-surface);
    border: 1px solid var(--vto-border);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.vto-garment-thumb {
    width: 64px;
    height: 76px;
    object-fit: contain;
    border-radius: 4px;
    background: #0d0d0d;
}

.vto-garment-meta h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.3rem 0;
    color: var(--vto-text);
}

.vto-garment-meta p {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--vto-text-muted);
    margin: 0;
}

/* Size Selection inside VTO */
.vto-size-picker {
    margin-bottom: 1.75rem;
}

.vto-size-picker label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--vto-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.vto-size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vto-size-chip {
    padding: 0.5rem 0.9rem;
    background: var(--vto-surface);
    border: 1px solid var(--vto-border);
    color: var(--vto-text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.vto-size-chip.selected {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
    font-weight: 600;
}

/* Action CTA */
.btn-vto-action {
    width: 100%;
    padding: 1.15rem;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 4px;
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-vto-action:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.btn-vto-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Overlay */
.vto-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 14, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 2rem;
}

.vto-loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.vto-spinner {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: vto-spin 0.85s linear infinite;
    margin-bottom: 1.25rem;
}

@keyframes vto-spin {
    to { transform: rotate(360deg); }
}

.vto-loading-status {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.vto-loading-subtext {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: var(--vto-text-muted);
}

/* Privacy Notice */
.vto-privacy-notice {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    color: var(--vto-text-muted);
    line-height: 1.5;
    margin-top: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Mobile & Tablet Responsive */
@media (max-width: 860px) {
    .vto-modal-body {
        grid-template-columns: 1fr;
    }
    
    .vto-viewport-pane {
        border-right: none;
        border-bottom: 1px solid var(--vto-border);
        min-height: 400px;
        padding: 1rem;
    }

    .vto-canvas-container {
        height: 400px;
    }

    .vto-controls-pane {
        padding: 1.5rem;
    }
}

/* ===============================================================
 * SITE-WIDE VTO PROMINENCE (NAVBAR & FLOATING BUTTON)
 * =============================================================== */

/* Navbar Pill */
.nav-vto-pill {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem !important;
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.25));
    border-radius: 20px;
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem !important;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text, #ffffff) !important;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

.nav-vto-pill:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

/* Floating Action Button (FAB) */
.mayo-floating-vto {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.floating-vto-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.4rem;
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-vto-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.25);
}

.floating-vto-badge {
    background: #ffffff;
    color: #000000;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    font-weight: 800;
}

.floating-vto-btn:hover .floating-vto-badge {
    background: #000000;
    color: #ffffff;
}

@media (max-width: 600px) {
    .mayo-floating-vto {
        bottom: 1.25rem;
        right: 1.25rem;
    }
    .floating-vto-btn {
        padding: 0.75rem 1.1rem;
        font-size: 0.78rem;
    }
}

/* Visually hide Decart automatic corner buttons without breaking their click handlers */
.vton-btn,
.vton-label,
.__decart-tryon-btn-container {
    opacity: 0.001 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
}

@keyframes mayoFadeInOut {
    0% { opacity: 0; transform: translate(-50%, 15px); }
    12% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* Suppress Decart duplicate left pill */
#__decart-pill-btn,
[id*="decart-pill"],
[class*="decart-pill"],
[id*="decart-beam"],
[id*="decart-imgbtn"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure Decart's mobile/desktop exit & minimize button is always prominent, visible, and tap-friendly */
#__decart-tryon-widget button[title="Minimize"],
#__decart-tryon-widget button[title="Close"],
#mayoDecartMobileClose {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2147483647 !important;
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: rgba(18, 18, 18, 0.92) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65) !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

#mayoDecartMobileClose:active,
#__decart-tryon-widget button[title="Minimize"]:active {
    transform: scale(0.92) !important;
    background: rgba(30, 30, 30, 0.98) !important;
}
