/* ========================================
   WIZARD MULTI-STEP - ESTILO MODERNO
   Sistema de Prova de Modelagem
   ======================================== */

:root {
    --wizard-primary: #e6007e;
    --wizard-primary-light: #fce7f3;
    --wizard-success: #10b981;
    --wizard-gray: #6b7280;
    --wizard-gray-light: #f3f4f6;
    --wizard-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================
   WIZARD CONTAINER
   ======================================== */

.wizard-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--wizard-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* ========================================
   WIZARD PROGRESS BAR
   ======================================== */

.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

/* Linha conectora entre steps */
.wizard-progress::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--wizard-gray-light);
    z-index: 0;
}

.wizard-progress-line {
    position: absolute;
    top: 30px;
    left: 10%;
    height: 3px;
    background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-success) 100%);
    z-index: 1;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ========================================
   WIZARD STEP INDICATOR
   ======================================== */

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wizard-step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--wizard-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--wizard-gray);
    transition: all 0.3s ease;
    position: relative;
}

.wizard-step-label {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wizard-gray);
    text-align: center;
    max-width: 120px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* Step ativo */
.wizard-step.active .wizard-step-circle {
    background: linear-gradient(135deg, var(--wizard-primary) 0%, #c20069 100%);
    border-color: var(--wizard-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(230, 0, 126, 0.3);
}

.wizard-step.active .wizard-step-label {
    color: var(--wizard-primary);
    font-weight: 700;
}

/* Step completo */
.wizard-step.completed .wizard-step-circle {
    background: linear-gradient(135deg, var(--wizard-success) 0%, #059669 100%);
    border-color: var(--wizard-success);
    color: white;
}

.wizard-step.completed .wizard-step-circle::after {
    content: '\2713'; /* Checkmark */
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
}

.wizard-step.completed .wizard-step-circle .step-number {
    display: none;
}

.wizard-step.completed .wizard-step-label {
    color: var(--wizard-success);
}

/* Hover effect apenas para steps acessíveis */
.wizard-step.completed:hover .wizard-step-circle {
    transform: scale(1.05);
}

/* ========================================
   WIZARD CONTENT
   ======================================== */

.wizard-content {
    min-height: 400px;
    padding: 2rem 1rem;
}

.wizard-step-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.wizard-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   WIZARD STEP HEADERS
   ======================================== */

.wizard-step-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--wizard-gray-light);
}

.wizard-step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wizard-step-title i {
    color: var(--wizard-primary);
}

.wizard-step-description {
    font-size: 1rem;
    color: var(--wizard-gray);
    margin: 0;
}

/* ========================================
   WIZARD ACTIONS
   ======================================== */

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--wizard-gray-light);
    gap: 1rem;
}

.wizard-actions .btn {
    min-width: 150px;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   CATEGORIA SELECTION (STEP 2)
   ======================================== */

.category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-option {
    position: relative;
}

.category-option input[type="radio"],
.category-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.category-card {
    border: 3px solid var(--wizard-gray-light);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-card:hover {
    border-color: var(--wizard-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(230, 0, 126, 0.15);
}

.category-option input[type="radio"]:checked + .category-card,
.category-option input[type="checkbox"]:checked + .category-card {
    border-color: var(--wizard-primary);
    background: var(--wizard-primary-light);
    box-shadow: 0 8px 25px rgba(230, 0, 126, 0.2);
    transform: scale(1.05);
}

.category-icon {
    font-size: 3rem;
    color: var(--wizard-gray);
    transition: color 0.3s ease;
}

.category-option input[type="radio"]:checked + .category-card .category-icon,
.category-option input[type="checkbox"]:checked + .category-card .category-icon {
    color: var(--wizard-primary);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.category-description {
    font-size: 0.875rem;
    color: var(--wizard-gray);
    margin: 0;
}

/* ========================================
   REVIEW SECTION (STEP 5)
   ======================================== */

.review-section {
    background: var(--wizard-gray-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-section-title i {
    color: var(--wizard-primary);
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 600;
    color: var(--wizard-gray);
}

.review-value {
    color: #1f2937;
    font-weight: 500;
    text-align: right;
}

/* ========================================
   IMAGE PREVIEW
   ======================================== */

.image-preview-container {
    margin-top: 1rem;
}

.image-preview {
    max-width: 300px;
    max-height: 300px;
    border-radius: 12px;
    border: 2px solid var(--wizard-gray-light);
    padding: 0.5rem;
    object-fit: cover;
}

/* ========================================
   FILE UPLOAD ENHANCED
   ======================================== */

.file-upload-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--wizard-primary);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.file-upload-label:hover {
    background: #c20069;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 0, 126, 0.3);
}

.file-upload-label i {
    font-size: 1.25rem;
}

.file-name-display {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--wizard-gray-light);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--wizard-gray);
    display: none;
}

.file-name-display.show {
    display: block;
}

/* ========================================
   VALIDATION MESSAGES
   ======================================== */

.validation-message {
    display: none;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.875rem;
    font-weight: 600;
}

.validation-message.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.validation-message i {
    font-size: 1.25rem;
}

/* ========================================
   DRAFT SAVE INDICATOR
   ======================================== */

.draft-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
}

.draft-indicator i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .wizard-progress {
        padding: 0 0.5rem;
    }

    .wizard-step-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .wizard-step-label {
        font-size: 0.75rem;
        max-width: 100px;
    }

    .category-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (576px - 767px) */
@media (max-width: 767px) {
    .wizard-container {
        padding: 1.5rem 1rem;
    }

    .wizard-progress {
        margin-bottom: 2rem;
    }

    .wizard-progress::before {
        left: 15%;
        right: 15%;
    }

    .wizard-progress-line {
        left: 15%;
    }

    .wizard-step-circle {
        width: 45px;
        height: 45px;
        font-size: 0.875rem;
    }

    .wizard-step-label {
        font-size: 0.7rem;
        max-width: 80px;
    }

    .wizard-step-title {
        font-size: 1.5rem;
    }

    .wizard-step-description {
        font-size: 0.875rem;
    }

    .wizard-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .wizard-actions .btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }

    .category-selection {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .review-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .review-value {
        text-align: left;
    }
}

/* Small Mobile (< 576px) */
@media (max-width: 575px) {
    .wizard-container {
        padding: 1rem 0.75rem;
        border-radius: 12px;
    }

    .wizard-progress {
        padding: 0;
    }

    .wizard-step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
        border-width: 2px;
    }

    .wizard-step-label {
        font-size: 0.65rem;
        max-width: 70px;
        margin-top: 0.5rem;
    }

    .wizard-content {
        padding: 1.5rem 0.5rem;
        min-height: 300px;
    }

    .wizard-step-header {
        margin-bottom: 1.5rem;
    }

    .wizard-step-title {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .category-icon {
        font-size: 2rem;
    }

    .category-name {
        font-size: 1.1rem;
    }

    .file-upload-label {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Very Small Mobile (< 400px) */
@media (max-width: 399px) {
    .wizard-progress::before {
        display: none;
    }

    .wizard-progress {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .wizard-step {
        flex-basis: calc(33.333% - 1rem);
    }

    .wizard-step-label {
        display: none;
    }

    .wizard-step-circle {
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .wizard-progress,
    .wizard-actions {
        display: none;
    }

    .wizard-step-content:not(.active) {
        display: block;
    }

    .wizard-container {
        box-shadow: none;
        padding: 0;
    }
}
