/* 
   CSS Timeline Forms - Renascença Agêntica
   Estilos específicos para timeline e formulário estruturado
*/

/* Timeline Navigation Styles */
.timeline-navigation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.timeline-header h4 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.progress-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.timeline-container {
    position: relative;
}

.timeline-progress {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1;
}

.progress-line {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: #28a745;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    min-width: 120px;
    position: relative;
}

.timeline-step:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.timeline-step.active {
    background: rgba(255, 255, 255, 0.2);
}

.timeline-step.completed {
    background: rgba(40, 167, 69, 0.2);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.timeline-step.active .step-icon {
    background: rgba(255, 255, 255, 0.3);
    border-color: #28a745;
    transform: scale(1.1);
}

.timeline-step.completed .step-icon {
    background: #28a745;
    border-color: #28a745;
}

.step-label {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.step-number {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.timeline-step.active .step-number {
    background: #28a745;
}

.timeline-step.completed .step-number {
    background: #28a745;
}

/* Form Section Styles */
.form-section {
    margin-bottom: var(--spacing-lg);
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h4 {
    color: var(--primary-green);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 5px;
}

/* Checkbox Groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-green);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkbox-item.checked {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: var(--primary-green);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.btn-nav {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-nav-primary {
    background-color: var(--primary-green);
    color: white;
}

.btn-nav-primary:hover:not(:disabled) {
    background-color: #27AE60;
}

.btn-nav-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-nav-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

/* Responsividade */
@media (max-width: 768px) {
    .timeline-navigation {
        padding: 1rem 0;
    }
    
    .timeline-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .timeline-header h4 {
        font-size: 1.2rem;
    }
    
    .timeline-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .timeline-step {
        min-width: 80px;
        flex: 1;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-number {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .timeline-steps {
        justify-content: center;
    }
    
    .timeline-step {
        min-width: 60px;
        padding: 0.25rem;
    }
    
    .step-label {
        display: none;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section.active {
    animation: fadeIn 0.3s ease-out;
}

/* Email Verification Styles */
.email-verification-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.email-verification-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.email-verification-status.verified {
    color: #28a745;
}

.email-verification-status.pending {
    color: #ffc107;
}

.email-verification-status.error {
    color: #dc3545;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Email Verification Lightbox Styles */
.email-verification-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.lightbox-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInScale 0.4s ease-out;
    z-index: 10001;
}

.lightbox-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox-header h3 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-body {
    padding: 2rem;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.status-icon {
    font-size: 2.5rem;
}

.status-text h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.status-text p {
    margin: 0;
    color: #666;
}

.status-text .text-muted {
    font-size: 0.9rem;
    color: #999;
}

.verification-form {
    margin-bottom: 2rem;
}

.verification-form .form-group {
    margin-bottom: 1.5rem;
}

.verification-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.verification-form .text-center {
    text-align: center;
}

.verification-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.verification-actions .btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.verification-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.verification-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.verification-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.verification-actions .btn-secondary:hover {
    background: #5a6268;
}

.verification-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.verification-timer {
    text-align: center;
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: 10px;
    border: 1px solid #ffc107;
}

.timer-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    background: linear-gradient(135deg, #ffc107 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.verification-timer p {
    margin: 0;
    font-size: 0.9rem;
}

.verification-success,
.verification-error {
    text-align: center;
    padding: 2rem;
}

.success-icon,
.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.verification-success h4,
.verification-error h4 {
    margin: 0 0 1rem 0;
}

.verification-success p,
.verification-error p {
    margin: 0;
    color: #666;
}

/* Responsividade para lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        width: 95%;
        margin: 1rem;
    }
    
    .lightbox-header {
        padding: 1.5rem;
    }
    
    .lightbox-header h3 {
        font-size: 1.2rem;
    }
    
    .lightbox-body {
        padding: 1.5rem;
    }
    
    .verification-actions {
        flex-direction: column;
    }
    
    .verification-actions .btn {
        width: 100%;
    }
}
