/* Loading Overlay - INICIALMENTE ESCONDIDO */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 18px;
    text-align: center;
    padding: 0 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container Principal */
.formulario-homenagem-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Progresso */
.progresso-formulario {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    overflow-x: auto;
}

.etapa {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap;
    margin: 0 5px;
    min-width: 80px;
    text-align: center;
}

.etapa.ativa {
    background: #667eea;
    color: white;
}

/* Conteúdo das Etapas */
.etapa-conteudo {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Campos do Formulário */
.campos-duplos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.campo-grupo {
    margin-bottom: 20px;
}

.campo-grupo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.campo-grupo input,
.campo-grupo textarea,
.campo-grupo select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.campo-grupo input:focus,
.campo-grupo textarea:focus {
    outline: none;
    border-color: #667eea;
}

.campo-grupo small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* Upload de Fotos */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-instructions .upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.input-fotos-hidden {
    display: none;
}

.preview-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.foto-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.foto-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.remover-foto {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
}

.nenhuma-foto {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Planos */
.planos-opcoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.plano-opcao {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.plano-opcao:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.plano-opcao.selecionado {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.plano-opcao.selecionado::before {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4CAF50;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.plano-titulo {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plano-preco {
    font-size: 2em;
    font-weight: 700;
    margin: 15px 0;
}

.plano-periodo {
    font-size: 0.9em;
    opacity: 0.8;
}

.plano-destaque {
    background: #ffd700;
    color: #333;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 10px;
}

.plano-opcao.selecionado .plano-destaque {
    background: rgba(255,255,255,0.3);
    color: white;
}

.plano-opcao ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
}

.plano-opcao li {
    margin-bottom: 8px;
    font-size: 0.9em;
}

/* Botões */
.botoes-etapa {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.botao-voltar,
.botao-proximo,
.botao-enviar {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.botao-voltar {
    background: #6c757d;
    color: white;
}

.botao-voltar:hover {
    background: #5a6268;
}

.botao-proximo,
.botao-enviar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.botao-proximo:hover,
.botao-enviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Resumo */
.resumo-dados {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

.resumo-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.resumo-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.resumo-item strong {
    min-width: 150px;
    color: #495057;
}

.resumo-texto {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
    flex: 1;
}

/* Termos */
.termos-uso {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.termos-uso label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.termos-uso input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

/* Botão Preview */
.botao-preview {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.botao-preview:hover {
    background: #138496;
}

/* Modal Preview */
.modal-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-preview {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.fechar-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fechar-modal:hover {
    background: rgba(255,255,255,0.2);
}

.modal-content {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.botao-fechar-preview {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.botao-fechar-preview:hover {
    background: #5a6268;
}

/* Preview da Homenagem */
.preview-homenagem {
    font-family: 'Inter', sans-serif;
    color: #333;
}

.preview-header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

.preview-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5em;
    margin: 0 0 10px 0;
}

.preview-header p {
    margin: 0;
    opacity: 0.9;
}

.preview-mensagem {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.preview-mensagem h3 {
    color: #667eea;
    margin: 0 0 10px 0;
}

.preview-historia {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #4ecdc4;
}

.preview-historia h3 {
    color: #4ecdc4;
    margin: 0 0 10px 0;
}

.preview-nota {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* Responsividade */
@media (max-width: 768px) {
    .formulario-homenagem-container {
        padding: 10px;
    }
    
    .progresso-formulario {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .etapa {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 70px;
    }
    
    .etapa-conteudo {
        padding: 20px 15px;
    }
    
    .campos-duplos {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .planos-opcoes {
        grid-template-columns: 1fr;
    }
    
    .plano-opcao {
        padding: 20px 15px;
    }
    
    .botoes-etapa {
        flex-direction: column;
        gap: 10px;
    }
    
    .botao-voltar,
    .botao-proximo,
    .botao-enviar {
        width: 100%;
        text-align: center;
    }
    
    .resumo-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .resumo-item strong {
        min-width: auto;
    }
    
    .modal-preview {
        margin: 10px;
    }
    
    .preview-header h2 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .plano-preco {
        font-size: 1.5em;
    }
    
    .plano-titulo {
        font-size: 1.1em;
    }
    
    .preview-fotos {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .foto-preview img {
        height: 80px;
    }
}

/* Botão de enviar atualizado */
.botao-enviar {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}

.botao-enviar:hover {
    background: linear-gradient(135deg, #218838, #1e9e8a) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3) !important;
}

.botao-enviar:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Info box de pagamento */
.info-pagamento {
    background: #f8f9fa !important;
    border-left: 4px solid #667eea !important;
}

.info-pagamento h4 {
    color: #667eea !important;
    font-size: 16px !important;
}

.info-pagamento ul {
    color: #666 !important;
    font-size: 14px !important;
}


/* Loading para o preview */
#btn-preview:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal do preview */
#modal-preview-homenagem {
    font-family: Arial, sans-serif;
}

.preview-homenagem-real {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.preview-homenagem-real h2,
.preview-homenagem-real h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
