/* --- Mawu Art – View in Your Space | Core UI Styles --- */

/* Theme compatibility protection */
#mawu-ar-overlay,
#mawu-ar-overlay * {
    box-sizing: border-box;
}

/* --- Wrapper --- */
.mawu-art-wrapper {
    margin-top: 12px;
}

/* --- Main product / shortcode button --- */
.mawu-ar-button {
    display: inline-block;
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 18px;
    margin-top: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.mawu-ar-button:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
}

.mawu-ar-button:active {
    transform: translateY(0);
}

/* --- Shortcode support --- */
.mawu-art-shortcode {
    display: inline-block;
}

.mawu-art-shortcode .mawu-ar-button {
    margin-top: 0;
}

/* --- App bridge --- */
.mawu-app-bridge {
    margin-top: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(200, 164, 74, 0.45);
    background: linear-gradient(180deg, #0c0c0c, #141414);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255, 215, 120, 0.08);
    display: inline-block;
    max-width: 340px;
}

.mawu-open-app {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #f5d76e;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease, transform 0.2s ease;
}

.mawu-open-app:hover {
    color: #ffffff;
    opacity: 0.95;
    transform: translateY(-1px);
    text-decoration: none;
}

.mawu-app-note {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.2px;
}

/* --- Overlay --- */
#mawu-ar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    text-align: center;
    font-family: inherit;
}

#mawu-ar-overlay.show {
    display: flex;
}

#mawu-ar-overlay * {
    user-select: none;
}

/* --- Panel --- */
#mawu-ar-panel {
    background: #111;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    min-width: 300px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* --- Status / message text --- */
#mawu-status {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.78);
}

#mawu-status.mawu-error {
    color: #ffb4b4;
}

#mawu-status.mawu-success {
    color: #c9f7c5;
}

/* --- Canvas --- */
#mawu-ar-canvas {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    background: #222;
    border: 2px solid #fff;
    margin: 10px auto 0;
    touch-action: none;
}

/* --- Buttons inside overlay --- */
.mawu-ar-actions button,
.mawu-ar-upload-options button {
    background: #fff;
    color: #000;
    border: none;
    margin: 4px 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    line-height: 1.2;
}

.mawu-ar-actions button:hover,
.mawu-ar-upload-options button:hover {
    background: #f0f0f0;
}

/* --- Focus states --- */
.mawu-ar-actions button:focus,
.mawu-ar-upload-options button:focus,
.mawu-ar-button:focus,
.mawu-open-app:focus,
.mawu-frame-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --- Hint text --- */
#mawu-hint {
    margin-top: 6px;
    font-size: 14px;
    opacity: 0.8;
}

/* --- Frame selection buttons --- */
.mawu-frame-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.mawu-frame-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

.mawu-frame-btn.active {
    transform: scale(1.2);
}

/* --- Frame color styles --- */
.frame-none {
    background: linear-gradient(45deg, #333, #111);
}

.frame-black {
    background: #000;
}

.frame-white {
    background: #fff;
}

.frame-gold {
    background: linear-gradient(45deg, #bfa142, #f5d76e);
}

/* --- Desktop QR bridge --- */
#mawu-qr-bridge {
    margin: 16px auto 18px;
    padding: 14px;
    max-width: 230px;
    text-align: center;
    border: 1px solid rgba(245, 215, 110, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, #151515, #0f0f0f);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255, 215, 120, 0.06);
}

#mawu-qr-bridge p {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #f5d76e;
}

#mawu-qr-bridge img {
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 auto 8px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
}

#mawu-qr-bridge small {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255,255,255,0.72);
}

/* --- Mobile tweaks --- */
@media (pointer: coarse) {
    #mawu-ar-panel {
        padding: 16px;
    }

    .mawu-app-bridge {
        margin-top: 14px;
    }

    #mawu-qr-bridge {
        display: none;
    }
}

/* --- Small screens --- */
@media (max-width: 480px) {
    #mawu-ar-panel {
        width: 94%;
        min-width: 0;
        padding: 16px;
    }

    .mawu-ar-upload-options,
    .mawu-ar-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .mawu-ar-actions button,
    .mawu-ar-upload-options button {
        min-width: 120px;
        margin: 0;
    }

    #mawu-hint,
    #mawu-status {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* --- Reduced motion accessibility --- */
@media (prefers-reduced-motion: reduce) {
    #mawu-ar-overlay *,
    .mawu-ar-button,
    .mawu-open-app,
    .mawu-frame-btn {
        transition: none !important;
        animation: none !important;
    }
}