/* MapeieAI conversational wizard */
.mw-root {
    --mw-accent-from: #6366f1;
    --mw-accent-to: #22d3ee;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 27, 75, 0.35));
    overflow: hidden;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

.mw-root-centered {
    width: 100%;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
}

.mw-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.mw-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mw-avatar svg {
    width: 1.85rem;
    height: 1.85rem;
}

.mw-title {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #a5b4fc, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mw-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.mw-body {
    padding: 1.25rem 1.25rem 1.5rem;
    min-height: 12rem;
    text-align: center;
}

.mw-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.mw-bubble {
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.15rem;
    border-radius: 1.1rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: center;
}

.mw-bubble .mw-q {
    margin: 0;
    white-space: pre-wrap;
    text-align: center;
}

.mw-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.12em;
    background: #a5b4fc;
    animation: mw-blink 0.55s step-end infinite;
}

@keyframes mw-blink {
    50% { opacity: 0; }
}

.mw-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
}

.mw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.mw-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.mw-btn:active {
    transform: scale(0.98);
}

.mw-btn-primary {
    border: none;
    background: linear-gradient(90deg, var(--mw-accent-from), var(--mw-accent-to));
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.5);
}

.mw-btn-primary:hover {
    filter: brightness(1.06);
}

.mw-btn-ghost {
    background: transparent;
    color: #94a3b8;
}

.mw-input {
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
    font-size: 0.9rem;
}

.mw-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.mw-input::placeholder {
    color: #64748b;
}

textarea.mw-input {
    min-height: 6rem;
    resize: vertical;
}

.mw-progress {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.mw-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background: rgba(100, 116, 139, 0.5);
    transition: background 0.2s, transform 0.2s;
}

.mw-dot.on {
    background: linear-gradient(90deg, var(--mw-accent-from), var(--mw-accent-to));
    transform: scale(1.25);
}

.mw-slot-wrap {
    margin-top: 0.75rem;
    width: 100%;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mw-slot-wrap .vc-box,
.mw-slot-wrap label {
    animation: none !important;
}

.mw-hidden-vault {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mantém campos dentro do <form> para POST, fora da tela */
.mw-offscreen {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.mw-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    justify-items: stretch;
}

.mw-choice-tile {
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    transition: all 0.15s;
}

.mw-choice-tile:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
}

.mw-choice-tile.selected {
    border-color: rgba(99, 102, 241, 0.7);
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
}

.mw-summary {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    line-height: 1.5;
    text-align: center;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}
