﻿/* ============================================================
   Página: Monte sua Foto de Perfil
   Tudo escopado dentro de .moldura-page pra não conflitar
   com site.css / campaign.css
   ============================================================ */

.moldura-page {
    --mp-vermelho: #CC0000;
    --mp-vermelho-escuro: #9c0000;
    --mp-azul: #1F3A5F;
    --mp-azul-escuro: #152943;
    --mp-verde: #1A7A2E;
    --mp-amarelo: #F5C400;
    --mp-cinza-bg: #F2EFEA;
    --mp-cinza-texto: #5b5b5b;
    background: var(--mp-cinza-bg);
    color: var(--mp-azul-escuro);
}

    .moldura-page * {
        box-sizing: border-box;
    }

    .moldura-page .mp-hero {
        position: relative;
        overflow: hidden;
        min-height: 340px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 64px 24px 70px;
    }

    .moldura-page .mp-hero-fundo {
        position: absolute;
        inset: 0;
        z-index: 0;
        background: linear-gradient(120deg,#7a0000 0%,#a60000 25%,var(--mp-vermelho) 50%,#a60000 75%,#7a0000 100%);
        background-size: 220% 220%;
        animation: mpFadeIn 700ms cubic-bezier(0.22,1,0.36,1) both, mpGradienteDeriva 20s ease-in-out infinite alternate;
    }

    .moldura-page .mp-hero-forma {
        position: absolute;
        z-index: 1;
        border-radius: 50%;
        filter: blur(50px);
        opacity: .25;
        pointer-events: none;
    }

    .moldura-page .mp-hero-forma-1 {
        width: 280px;
        height: 280px;
        background: #ffffff;
        top: -90px;
        left: -60px;
        animation: mpFormaDeriva1 16s ease-in-out infinite alternate;
    }

    .moldura-page .mp-hero-forma-2 {
        width: 220px;
        height: 220px;
        background: #450000;
        bottom: -80px;
        right: -40px;
        animation: mpFormaDeriva2 18s ease-in-out infinite alternate;
    }

    .moldura-page .mp-hero-pontos {
        position: absolute;
        z-index: 1;
        top: 50%;
        width: 120px;
        height: 120px;
        background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.5px, transparent 1.6px);
        background-size: 16px 16px;
        opacity: .5;
        pointer-events: none;
        animation: mpFlutuar 6s ease-in-out infinite;
    }

    .moldura-page .mp-hero-pontos-esq {
        left: 32px;
        transform: translateY(-50%);
    }

    .moldura-page .mp-hero-pontos-dir {
        right: 32px;
        transform: translateY(-50%);
    }

    .moldura-page .mp-hero-conteudo {
        position: relative;
        z-index: 2;
        max-width: 640px;
    }

    .moldura-page .mp-hero-selo {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--mp-azul);
        color: #fff;
        font-family: 'Open Sans',sans-serif;
        font-weight: 600;
        font-size: 13.5px;
        padding: 8px 16px;
        border-radius: 20px;
        margin-bottom: 18px;
        animation: mpFadeInScale 500ms cubic-bezier(0.22,1,0.36,1) both;
        animation-delay: 120ms;
    }

    .moldura-page .mp-hero-titulo {
        margin: 0 0 14px;
        font-family: 'Oswald',sans-serif;
        text-transform: uppercase;
        letter-spacing: .01em;
        font-size: 38px;
        line-height: 1.15;
        color: #fff;
    }

    .moldura-page .mp-hero-titulo-linha {
        display: block;
        opacity: 0;
        animation: mpFadeInUp 600ms cubic-bezier(0.22,1,0.36,1) both;
    }

        .moldura-page .mp-hero-titulo-linha:nth-child(1) {
            animation-delay: 260ms;
        }

        .moldura-page .mp-hero-titulo-linha:nth-child(2) {
            animation-delay: 400ms;
        }

    .moldura-page .mp-hero-texto {
        margin: 0;
        font-family: 'Open Sans',sans-serif;
        font-size: 15px;
        color: #ffd9d9;
        animation: mpFadeIn 600ms cubic-bezier(0.22,1,0.36,1) both;
        animation-delay: 560ms;
    }

    .moldura-page .mp-hero-onda {
        position: absolute;
        left: -20%;
        right: auto;
        bottom: -1px;
        width: 140%;
        height: 70px;
        z-index: 2;
        animation: mpOndaBalanco 5s ease-in-out infinite alternate;
    }

@keyframes mpOndaBalanco {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-14%);
    }
}

@keyframes mpFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mpFadeInScale {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mpFadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mpGradienteDeriva {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@keyframes mpFormaDeriva1 {
    0% {
        transform: translate(0,0);
    }

    100% {
        transform: translate(18px,14px);
    }
}

@keyframes mpFormaDeriva2 {
    0% {
        transform: translate(0,0);
    }

    100% {
        transform: translate(-16px,-12px);
    }
}

@keyframes mpFlutuar {
    0%,100% {
        transform: translateY(-50%) translateY(0);
    }

    50% {
        transform: translateY(-50%) translateY(-8px);
    }
}

@media (max-width:640px) {
    .moldura-page .mp-hero {
        min-height: 0;
        padding: 48px 20px 56px;
    }

    .moldura-page .mp-hero-titulo {
        font-size: 28px;
    }

    .moldura-page .mp-hero-pontos {
        width: 70px;
        height: 70px;
        opacity: .35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .moldura-page .mp-hero-fundo,
    .moldura-page .mp-hero-selo,
    .moldura-page .mp-hero-titulo-linha,
    .moldura-page .mp-hero-texto {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transform: none !important;
    }

    .moldura-page .mp-hero-forma,
    .moldura-page .mp-hero-pontos {
        animation: none !important;
    }
}

.moldura-page main {
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 18px 60px;
    position: relative;
    z-index: 2;
}

.moldura-page .mp-passo-titulo {
    font-family: 'Open Sans',sans-serif;
    font-size: 15px;
    color: var(--mp-azul);
    font-weight: 600;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .moldura-page .mp-passo-titulo .mp-n {
        background: var(--mp-azul);
        color: #fff;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-family: 'Oswald',sans-serif;
        flex: none;
    }

/* Seletor de moldura */
.moldura-page .mp-grade-molduras {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin-bottom: 8px;
}

.moldura-page .mp-moldura-opcao {
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    transition: border-color .15s, transform .1s;
}

    .moldura-page .mp-moldura-opcao img {
        width: 100%;
        display: block;
    }

    .moldura-page .mp-moldura-opcao:active {
        transform: scale(.97);
    }

    .moldura-page .mp-moldura-opcao.selecionada {
        border-color: var(--mp-amarelo);
        box-shadow: 0 0 0 2px var(--mp-azul);
    }

.moldura-page .mp-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-top: 22px;
    box-shadow: 0 2px 10px rgba(21,41,67,.06);
}

/* Upload inicial */
.moldura-page .mp-zona-upload {
    border: 2px dashed #c9c2b4;
    border-radius: 12px;
    padding: 34px 16px;
    text-align: center;
    cursor: pointer;
    color: var(--mp-cinza-texto);
    font-family: 'Open Sans',sans-serif;
}

    .moldura-page .mp-zona-upload strong {
        display: block;
        color: var(--mp-azul);
        font-family: 'Oswald',sans-serif;
        font-size: 15px;
        text-transform: uppercase;
        margin-bottom: 4px;
    }

    .moldura-page .mp-zona-upload svg {
        margin-bottom: 10px;
    }

/* Editor */
.moldura-page .mp-stage-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: repeating-conic-gradient(#e9e5db 0% 25%, #f2efea 0% 50%) 50%/24px 24px;
    touch-action: none;
    user-select: none;
}

    .moldura-page .mp-stage-wrap canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

.moldura-page .mp-dica-arraste {
    text-align: center;
    font-size: 12.5px;
    color: var(--mp-cinza-texto);
    margin: 10px 0 0;
    font-family: 'Open Sans',sans-serif;
}

.moldura-page .mp-controle-zoom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

    .moldura-page .mp-controle-zoom svg {
        flex: none;
        color: var(--mp-azul);
    }

.moldura-page input[type="range"] {
    flex: 1;
    accent-color: var(--mp-vermelho);
    height: 4px;
}

.moldura-page .mp-linha-botoes {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.moldura-page button {
    font-family: 'Oswald',sans-serif;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 13px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter .15s, transform .05s;
}

    .moldura-page button:active {
        transform: translateY(1px);
    }

.moldura-page .mp-btn-primario {
    background: var(--mp-vermelho);
    color: #fff;
    flex: 1 1 auto;
}

    .moldura-page .mp-btn-primario:hover {
        filter: brightness(1.08);
    }

.moldura-page .mp-btn-secundario {
    background: var(--mp-azul);
    color: #fff;
}

    .moldura-page .mp-btn-secundario:hover {
        filter: brightness(1.15);
    }

.moldura-page .mp-btn-fantasma {
    background: #eee7d9;
    color: var(--mp-azul-escuro);
}

.moldura-page input[type="file"] {
    display: none;
}

.moldura-page .mp-rodape-aviso {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eaf3ec;
    border: 1px solid #cfe6d5;
    color: #1f5a2c;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    font-family: 'Open Sans',sans-serif;
    margin-top: 22px;
    line-height: 1.5;
}

    .moldura-page .mp-rodape-aviso svg {
        flex: none;
        margin-top: 1px;
    }

.moldura-page .mp-oculto {
    display: none !important;
}

.mp-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: #152943;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: 'Open Sans',sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
}

    .mp-toast.mostrar {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
