/* --- 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;
    }
}
/* Collector inquiry: integrated preview, compact on desktop and separate view on mobile. */
#mawu-inquiry-actions[hidden], #mawu-inquiry-view[hidden] { display:none!important; }
#mawu-inquiry-actions { margin-top:16px; padding-top:14px; border-top:1px solid #777; text-align:left; }
.mawu-inquiry-heading { font-weight:600; margin:0 0 10px!important; }
.mawu-inquiry-buttons { display:flex; gap:10px; flex-wrap:wrap; }
.mawu-inquiry-buttons a, .mawu-inquiry-buttons button, #mawu-inquiry-back, #mawu-inquiry-send { background:#262626; color:#fff; border:1px solid #666; border-radius:5px; padding:11px 14px; font:inherit; cursor:pointer; text-decoration:none; }
#mawu-inquiry-confirm { margin:10px 0 0; font-size:14px; }
#mawu-inquiry-view { padding:14px 0; text-align:left; }
#mawu-inquiry-view h2 { font-size:20px; margin:18px 0; color:inherit; }
#mawu-inquiry-form label { display:block; margin:12px 0; font-size:14px; }
#mawu-inquiry-form input:not([type=checkbox]), #mawu-inquiry-form textarea { display:block; width:100%; min-height:44px; box-sizing:border-box; border:1px solid #aaa; border-radius:4px; padding:10px; margin-top:5px; font:16px/1.4 inherit; background:#fff; color:#111; }
#mawu-inquiry-form .mawu-inquiry-consent { display:flex; align-items:flex-start; gap:10px; line-height:1.5; }
#mawu-inquiry-form .mawu-inquiry-consent input { width:20px; height:20px; flex:0 0 20px; margin-top:2px; }
#mawu-inquiry-form .mawu-inquiry-hp { position:absolute!important; left:-9999px!important; opacity:0!important; width:1px!important; height:1px!important; }
#mawu-inquiry-send { width:100%; min-height:48px; text-transform:uppercase; letter-spacing:1px; }
#mawu-inquiry-send:disabled { opacity:.5; cursor:wait; }
#mawu-inquiry-status { min-height:1.5em; font-size:14px; }
#mawu-ar-panel.mawu-inquiry-active > :not(#mawu-inquiry-view) { display:none!important; }
@media(max-width:600px) {
  #mawu-inquiry-actions { padding-top:12px; }
  .mawu-inquiry-buttons { flex-direction:column; }
  .mawu-inquiry-buttons a, .mawu-inquiry-buttons button { width:100%; box-sizing:border-box; min-height:46px; text-align:center; }
  #mawu-ar-panel.mawu-inquiry-active { overflow-y:auto; max-height:calc(100dvh - 90px); }
  #mawu-inquiry-view { padding:4px 0 12px; }
}

/* 3.0.5: compact, accessible close control, including inquiry view. */
#mawu-ar-panel #mawu-close {
  position: sticky; top: 0; float: right; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; padding: 0; margin: -8px -8px 0 8px;
  border: 1px solid #777; border-radius: 50%; background: #262626; color: #fff;
  font: 32px/1 Arial, sans-serif; cursor: pointer;
}
#mawu-ar-panel #mawu-close:focus-visible { outline: 3px solid #f2d36b; outline-offset: 2px; }
#mawu-ar-panel.mawu-inquiry-active > #mawu-close { display: flex!important; }
@media (max-width: 600px) {
  #mawu-inquiry-view { padding: 0 0 8px; }
  #mawu-inquiry-view h2 { font-size: 19px; margin: 8px 0 12px; line-height: 1.25; }
  #mawu-inquiry-form label { margin: 8px 0; }
  #mawu-inquiry-form input:not([type=checkbox]), #mawu-inquiry-form textarea { margin-top: 4px; padding: 8px 10px; }
  #mawu-inquiry-form textarea { min-height: 70px; resize: vertical; }
  #mawu-inquiry-back { padding: 8px 12px; min-height: 44px; }
  #mawu-inquiry-send { min-height: 48px; }
}
