/* Memória Adesiva — Upload v1.1.0 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ── Esconder WCUF completamente ─────────────────────────── */
.wcuf_file_uploads_container,
.wcuf_upload_fields_row_element,
.wcuf_upload_field_title,
.wcuf_upload_drag_and_drop_area,
.wcuf_upload_field_button,
.wcuf_already_uploaded_data_container,
.wcuf_upload_status_box,
.wcuf_summary_box,
.wcuf_summary_box_container,
.wcuf-summary-box,
.wcuf_multiple_file_progress_container,
.wcuf_single_upload_field_container,
.wcuf_upload_fields_container,
#wcuf_upload_button,
.delete_button,
.wcuf-title-container,
[class*="wcuf_"] {
    display: none !important;
    visibility: hidden !important;
}

/* ── Página dedicada ──────────────────────────────────────── */
.ma-page {
    font-family: 'Montserrat', system-ui, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 4px 40px;
}

/* Cabeçalho */
.ma-page-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e5e0;
}
.ma-back {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    white-space: nowrap;
    padding-top: 3px;
    transition: color .2s;
}
.ma-back:hover { color: #1a1a1a; }
.ma-page-title { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.ma-page-sub { font-size: 11px; color: #aaa; margin-top: 4px; }

/* Barra de progresso */
.ma-progress-card {
    background: #fff;
    border: 1px solid #e8e5e0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.ma-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}
.ma-progress-top strong { color: #1a1a1a; font-size: 15px; }
.ma-pct { font-weight: 700; color: #c8a96e; }
.ma-bar-bg { background: #f0ede8; border-radius: 6px; height: 9px; overflow: hidden; }
.ma-bar-fill {
    background: #c8a96e;
    height: 100%; border-radius: 6px;
    transition: width .4s ease;
}
.ma-bar-fill.completo { background: #2d6a3f; }

/* Grid — menos colunas, fotos maiores */
.ma-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}
@media (min-width: 480px) {
    .ma-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; }
}
@media (min-width: 700px) {
    .ma-grid { grid-template-columns: repeat(6, 1fr) !important; }
}


/* Slot — bordas RETAS como figurinha, sem arredondamento */
.ma-slot,
.ma-grid .ma-slot,
.ma-page .ma-slot,
.ma-slot img,
.ma-slot .ma-slot-inner,
.ma-slot label {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}
.ma-slot {
    aspect-ratio: 1 !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f0ede8 !important;
    border: 1.5px dashed #ccc !important;
    cursor: pointer !important;
    transition: border-color .15s !important;
    -webkit-tap-highlight-color: transparent !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.ma-slot:hover { border-color: #c8a96e !important; }
/* Slot preenchido — borda branca fina como figurinha real */
.ma-slot.cheio {
    border: 3px solid #fff !important;
    outline: 1px solid #ccc !important;
    box-shadow: none !important;
}
.ma-slot.enviando { opacity: .5 !important; pointer-events: none !important; }

.ma-slot-inner {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; cursor: pointer;
}
.ma-plus { font-size: 20px; color: #ccc; transition: color .2s; }
.ma-slot:hover .ma-plus { color: #c8a96e; }
.ma-slot-label { font-size: 9px; color: #bbb; font-weight: 600; }

.ma-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ma-slot-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    opacity: 0; transition: opacity .2s;
}
.ma-slot.cheio:hover .ma-slot-overlay { opacity: 1; }
.ma-slot-btn {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.92);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer;
    transition: background .2s;
}
.ma-slot-btn.del { color: #e63946; }
.ma-slot-btn.del:hover { background: #e63946; color: #fff; }
.ma-slot-btn.rep { color: #1a1a1a; }
.ma-slot-btn.rep:hover { background: #1a1a1a; color: #fff; }
.ma-slot-n,
.ma-page .ma-slot-n,
.ma-grid .ma-slot .ma-slot-n,
div.ma-slot-n {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
/* Esconder qualquer número/badge que o tema injete dentro do slot preenchido */
.ma-slot.cheio > span,
.ma-slot.cheio > div:not(.ma-slot-overlay),
.ma-slot.cheio .ma-slot-n {
    display: none !important;
}

/* Dica */
.ma-tip { font-size: 11px; color: #aaa; line-height: 1.5; text-align: center; margin-bottom: 20px; }

/* Finalizar */
.ma-finalizar {
    background: #d4edda;
    border: 1px solid #a8d5b5;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 8px;
}
.ma-finalizar-msg { font-size: 16px; font-weight: 700; color: #155724; margin-bottom: 6px; }
.ma-finalizar-sub { font-size: 12px; color: #2d6a3f; margin-bottom: 16px; }
.ma-btn-confirmar {
    display: block; width: 100%;
    background: #2d6a3f; color: #fff;
    border: none; padding: 14px;
    border-radius: 8px; font-family: 'Montserrat', sans-serif;
    font-size: 14px; font-weight: 700; cursor: pointer;
    margin-bottom: 10px; transition: background .2s;
}
.ma-btn-confirmar:hover { background: #1e4d2e; }
.ma-btn-continuar {
    background: transparent; color: #2d6a3f;
    border: 1px solid #a8d5b5;
    padding: 10px 20px; border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all .2s;
}
.ma-btn-continuar:hover { background: #fff; }

/* Concluído */
.ma-concluido {
    text-align: center; padding: 40px 20px;
    background: #fff; border: 1px solid #e8e5e0;
    border-radius: 12px; margin-top: 8px;
}
.ma-concluido-icon {
    width: 60px; height: 60px;
    background: #2d6a3f; color: #fff;
    border-radius: 50%; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.ma-concluido-title { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.ma-concluido-sub { font-size: 13px; color: #888; margin-bottom: 20px; line-height: 1.5; }
.ma-btn-voltar {
    display: inline-block;
    background: #1a1a1a; color: #fff;
    padding: 12px 28px; border-radius: 8px;
    font-size: 13px; font-weight: 700;
    text-decoration: none; font-family: 'Montserrat', sans-serif;
    transition: background .2s;
}
.ma-btn-voltar:hover { background: #333; }

/* ── Modal Crop ───────────────────────────────────────────── */
.ma-crop-modal {
    display: none; position: fixed; inset: 0;
    z-index: 999999; align-items: center; justify-content: center; padding: 12px;
}
.ma-crop-modal.aberto { display: flex; }
.ma-crop-fundo { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.ma-crop-caixa {
    position: relative; z-index: 1; background: #fff;
    border-radius: 14px; width: 100%; max-width: 460px;
    overflow: hidden; display: flex; flex-direction: column; max-height: 90vh;
}
.ma-crop-topo {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: 14px; color: #1a1a1a;
    border-bottom: 1px solid #f0ede8; flex-shrink: 0;
}
.ma-crop-fechar { background: none; border: none; font-size: 18px; cursor: pointer; color: #aaa; }
.ma-crop-canvas { background: #111; overflow: hidden; flex: 1; min-height: 0; }
.ma-crop-canvas img { display: block; max-width: 100%; }

/* Botões de modo */
.ma-crop-modos {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
    flex-shrink: 0;
}
.ma-modo-btn {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid #e0ddd8;
    border-radius: 6px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.ma-modo-btn.ativo {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}
.ma-modo-btn:hover:not(.ativo) { border-color: #888; color: #1a1a1a; }

/* Dica do modo */
.ma-crop-dica {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #888;
    text-align: center;
    padding: 6px 16px 10px;
    flex-shrink: 0;
    line-height: 1.4;
}
.ma-crop-rodape {
    display: flex; gap: 8px; padding: 14px 18px;
    border-top: 1px solid #f0ede8; flex-shrink: 0;
}
.ma-btn-cancel {
    background: transparent; color: #aaa;
    border: 1px solid #e8e5e0; padding: 11px 14px;
    border-radius: 8px; font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 600; cursor: pointer;
}
.ma-btn-semcorte {
    flex: 1;
    background: #f0ede8; color: #1a1a1a;
    border: none; padding: 11px 10px;
    border-radius: 8px; font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; cursor: pointer;
    transition: background .2s;
}
.ma-btn-semcorte:hover { background: #e0ddd8; }
.ma-btn-ok {
    flex: 1; background: #1a1a1a; color: #fff; border: none;
    padding: 11px; border-radius: 8px; font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s;
}
.ma-btn-ok:hover { background: #333; }
.ma-btn-cancel {
    background: transparent; color: #888; border: 1px solid #e0ddd8;
    padding: 11px 18px; border-radius: 8px; font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.ma-btn-cancel:hover { border-color: #1a1a1a; color: #1a1a1a; }

/* ── Loading ──────────────────────────────────────────────── */
.ma-loading {
    display: none; position: fixed; inset: 0; z-index: 999998;
    background: rgba(255,255,255,.88);
    flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.ma-loading.visivel { display: flex; }
.ma-spinner {
    width: 36px; height: 36px; border: 3px solid #f0ede8;
    border-top-color: #c8a96e; border-radius: 50%;
    animation: ma-giro .8s linear infinite;
}
.ma-loading-txt {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
    white-space: pre-line; /* respeita \n no texto */
}
@keyframes ma-giro { to { transform: rotate(360deg); } }

/* ── Título inline (dentro do pedido) ────────────────────────── */
.ma-page-title-inline {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e5e0;
}
.ma-page-sub-inline {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
}

/* Botão ver fotos */
.ma-btn-ver-fotos {
    display: block;
    width: 100%;
    background: transparent;
    color: #2d6a3f;
    border: 1.5px solid #a8d5b5;
    padding: 11px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all .2s;
}
.ma-btn-ver-fotos:hover { background: #d4edda; }

/* ── Animações de slot ────────────────────────────────────── */
.ma-slot img { transition: opacity .4s ease; }

/* ✓ verde ao salvar foto */
.ma-slot-ok {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 106, 63, 0.75);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    border-radius: 0;
}
.ma-slot-ok.visivel { opacity: 1; }

/* Spinner no slot enquanto envia */
.ma-slot.enviando::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ma-slot.enviando::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 24px; height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #c8a96e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ma-spin .7s linear infinite;
    z-index: 10;
}
@keyframes ma-spin { to { transform: rotate(360deg); } }

/* ── Seção Foto de Destaque ─────────────────────────────── */
.ma-destaque-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dashed #e8e5e0;
}
.ma-destaque-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.ma-destaque-icon {
    font-size: 18px;
}
.ma-destaque-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.ma-destaque-info {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #c8a96e;
    padding: 3px 10px;
    border-radius: 20px;
}
.ma-destaque-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 320px;
}
/* Slot vazio — borda dourada tracejada */
.ma-slot.ma-slot-destaque {
    aspect-ratio: 1 !important;
    min-height: 140px;
    border: 2px dashed #c8a96e !important;
    background: linear-gradient(135deg, #fdf8f0 0%, #f9f3e8 100%) !important;
}
.ma-slot.ma-slot-destaque:hover {
    border-color: #a88a4e !important;
}
/* Slot preenchido — borda branca igual às outras fotos */
.ma-slot.ma-slot-destaque.cheio {
    border: 3px solid #fff !important;
    outline: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #f0ede8 !important;
}
.ma-slot.ma-slot-destaque .ma-slot-label {
    font-size: 10px;
    color: #c8a96e;
    font-weight: 700;
}
.ma-slot.ma-slot-destaque .ma-plus {
    color: #c8a96e;
}
