/**
 * Estilos do Frontend - Sistema de Inscrições
 * 
 * @package RegistrationSystem
 * @version 1.0.0
 */

/* ===== MODAL DE SUCESSO ===== */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(5px);
}

.modal-container {
    background: #fff !important;
    border-radius: 16px !important;
    max-width: 638px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: modalSlideIn 0.3s ease-out;
    position: relative !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botão de fechar */
.close-btn {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #666 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

.close-btn:hover {
    color: #333 !important;
}

/* Ícone de sucesso */
.success-icon {
    font-size: 4rem !important;
    color: #28a745 !important;
    margin-bottom: 20px !important;
}

/* Botão copiar PIX */
.copy-btn {
    transition: all 0.3s ease;
}

.copy-btn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* ===== FORMULÁRIO DE INSCRIÇÃO ===== */
.form-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.form-message.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-message.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ===== SELEÇÃO DE ETAPAS ===== */
.etapa-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.etapa-option:hover {
    border-color: #2c5aa0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.1);
}

.etapa-option.selected {
    border-color: #2c5aa0;
    background-color: #f8f9ff;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15);
}

.etapa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.etapa-nome {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c5aa0;
    margin: 0;
}

.etapa-valor {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.etapa-info {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.etapa-info p {
    margin: 5px 0;
}

.vagas-info {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Badge de esgotado */
.badge-esgotado {
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== CAMPOS DO FORMULÁRIO ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* ===== BOTÕES ===== */
.btn-primary {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1e3f73;
    border-color: #1e3f73;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .modal-container {
        width: 95% !important;
        margin: 20px !important;
        max-height: calc(100vh - 40px) !important;
    }
    
    .etapa-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .etapa-valor {
        margin-top: 5px;
    }
    
    .form-control {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message {
    animation: slideDown 0.3s ease-out;
}

/* ===== UTILITÁRIOS ===== */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }

/* ===== MODAL OPEN STATE ===== */
body.modal-open {
    overflow: hidden;
}

body.modal-open .modal-overlay {
    display: flex !important;
}

/* ===== LOADING SPINNER ===== */
.fa-spinner.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
