/* Custom Stepper Wizard Styling */
.custom-stepper-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid #e2e8f0;
}

.custom-stepper-tabs .nav-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.custom-stepper-tabs .nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    right: -50%;
    width: 100%;
    height: 3px;
    background-color: #cbd5e1;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.custom-stepper-tabs .nav-item.completed:not(:last-child)::after {
    background-color: #10b981;
}

.step-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    width: 100%;
    position: relative;
    z-index: 2;
    cursor: pointer;
    outline: none;
    padding: 0.5rem 0;
}

.step-tab-btn:disabled {
    cursor: not-allowed;
}

.step-icon-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-tab-btn.active .step-icon-num {
    background-color: #0b79b4;
    border-color: #0b79b4;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(11, 121, 180, 0.25);
}

.nav-item.completed .step-icon-num {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.step-tab-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.3s ease;
}

.step-tab-btn.active .step-tab-text {
    color: #0b79b4;
}

.nav-item.completed .step-tab-text {
    color: #10b981;
}

/* Stepper Sections */
.step-section {
    display: none;
}

.step-section.active {
    display: block;
    animation: fadeInStep 0.4s ease-in-out;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wizard Buttons Container */
.wizard-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    gap: 0.75rem;
}

.wizard-buttons .btn-draft-row {
    order: 3;
    width: 100%;
    text-align: center;
}

.wizard-buttons .btn-prev {
    order: 1;
}

.wizard-buttons .btn-next,
.wizard-buttons .SubmitModal {
    order: 2;
    margin-left: auto;
}

.wizard-buttons button {
    min-width: 140px;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-prev {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-prev:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.btn-next {
    background-color: #0b79b4;
    color: #ffffff;
    border: none;
}

.btn-next:hover {
    background-color: #096393;
}

/* Validation Highlights */
.form-control.is-invalid, 
.form-select.is-invalid,
.checkbox-group.is-invalid {
    border-color: #ef4444 !important;
    background-image: none !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.invalid-feedback {
    display: block;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Drag and Drop Container on step 5 */
.step-section .file-upload-label {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
}

.step-section .file-upload-label:hover {
    border-color: #0b79b4;
    background-color: #f0f9ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-stepper-tabs .nav-item:not(:last-child)::after {
        top: 20px;
    }
    
    .step-icon-num {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .step-tab-text {
        font-size: 0.75rem;
        display: none; /* Hide text on mobile for clean UI */
    }
    
    .wizard-buttons button {
        min-width: 100px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
    background: #ffffff00;
}

/* Input with icon styling */
.input-with-icon-wrapper {
    position: relative;
}

.input-with-icon-wrapper .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #0b79b4;
    z-index: 4;
    pointer-events: none;
    font-size: 1.1rem;
}

.input-with-icon-wrapper .form-control {
    padding-left: 45px !important;
}

.input-with-icon-wrapper label {
    left: 45px !important;
}

/* Float label position when input is active/focused */
.input-with-icon-wrapper .form-control:focus ~ label,
.input-with-icon-wrapper .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    left: 45px !important;
}

.input-with-icon-wrapper .form-control:focus ~ .input-icon,
.input-with-icon-wrapper .form-control:not(:placeholder-shown) ~ .input-icon,
.input-with-icon-wrapper:has(.form-control:focus) .input-icon,
.input-with-icon-wrapper:has(.form-control:not(:placeholder-shown)) .input-icon {
    top: 62%;
}

/* Premium step header card additional styles */
.step-header-card {
    transition: all 0.3s ease;
}
.step-header-icon-box {
    box-shadow: 0 4px 10px rgba(11, 121, 180, 0.3);
}

/* Stepper adjustments for premium look */
.custom-stepper-tabs .nav-item::after {
    height: 4px !important;
}

/* Question rows styling */
.question-row {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.question-row:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.question-text {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
}

.question-select select {
    font-weight: 600;
    color: #0b79b4;
    border-color: #cbd5e1;
}

.question-select select:focus {
    border-color: #0b79b4;
    box-shadow: 0 0 0 3px rgba(11, 121, 180, 0.15);
}

@media (max-width: 768px) {
    .step-header-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    .step-header-icon-box {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.2rem !important;
        margin-right: 0.75rem !important;
    }
    .step-header-card h2 {
        font-size: 1.1rem !important;
    }
    .step-header-card p {
        font-size: 0.75rem !important;
    }
}

/* Custom styles for yes/no question rows and buttons */
.question-row.active-yes {
    background-color: #fffde7 !important;
    border-color: #ffd600 !important;
}
.question-row.active-yes:hover {
    background-color: #fffde7 !important;
    border-color: #ffd600 !important;
}

.explanation-box {
    background-color: #fffde7 !important;
    border: 1px solid #ffd600 !important;
}

.wizard-buttons .btn-next.btn-success {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}
.wizard-buttons .btn-next.btn-success:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}