/* ==========================================================================
   Internship Portal — Multi-Step Application Form Stylesheet
   ========================================================================== */

.form-wrapper {
    max-width: 860px;
    margin: -3rem auto 4rem;
    position: relative;
    z-index: 10;
}

.form-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
}

/* STEP PROGRESS BAR */
.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 3rem;
}

.step-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.progress-bar-fill {
    position: absolute;
    top: 20px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.4s ease;
    z-index: 2;
}

.progress-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    max-width: 80px;
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.progress-step.active .step-number {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.progress-step.completed .step-number {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    width: 100%;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

/* FORM STEP PANELS */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-heading {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.step-heading h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.step-heading p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* FORM FIELDS & LAYOUT */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: white;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3.5px var(--primary-light);
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.18) !important;
}

.invalid-feedback {
    display: block !important;
    font-size: 0.8rem;
    color: #ef4444 !important;
    font-weight: 500;
    margin-top: 4px;
}

/* CUSTOM CHECKBOXES & RADIOS */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.custom-option {
    position: relative;
}

.custom-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: white;
}

.custom-option input:checked + .option-card {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

/* SKILLS SELECTION TAGS */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    max-height: 200px;
    overflow-y: auto;
}

.skill-tag {
    cursor: pointer;
    user-select: none;
}

.skill-tag input {
    display: none;
}

.skill-pill {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 9999px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tag input:checked + .skill-pill {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* FILE DROP AREA */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload-area:hover, .file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.file-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.file-name-preview {
    font-weight: 600;
    color: var(--success-color);
    margin-top: 0.5rem;
}

/* FORM NAVIGATION BUTTONS */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.alert-banner {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
