/* Apply Page Styles */

:root {
    --primary: #180161;
    --secondary: #4f1787;
    --accent: #eb3678;
    --highlight: #fb773c;
    --background: #ffffff;
    --text-color: #333;
    --white: #fff;
}

.apply-hero {
    background: linear-gradient(rgba(24, 1, 97, 0.85), rgba(43, 23, 135, 0.925)),
        url('https://images.pexels.com/photos/3183150/pexels-photo-3183150.jpeg') center/cover no-repeat fixed;
    padding: 8rem 0 4rem;
    text-align: center;
    padding: 13rem 20px;
    color: white;
}

.apply-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.apply-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.apply-content {
    padding: 4rem 0;
    background: var(--soft-lilac);
}

.apply-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.apply-form-section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.apply-form-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #E5E7EB;
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6B7280;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6B7280;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary);
    font-weight: 500;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.apply-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(85, 173, 155, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.has-error .error-message {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.form-navigation button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-prev {
    background: var(--soft-lilac);
    color: var(--primary);
    border: none;
}

.btn-prev:hover {
    background: var(--secondary);
}

.btn-next,
.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-next:hover,
.btn-submit:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-next:disabled,
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Info Card */
.apply-info-section {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--soft-lilac);
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li i {
    color: var(--primary);
    font-size: 0.875rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .apply-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .apply-info-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .apply-hero {
        padding: 6rem 0 3rem;
    }

    .apply-hero h1 {
        font-size: 2rem;
    }

    .apply-content {
        padding: 2rem 0;
    }

    .apply-form-section,
    .info-card {
        padding: 1.5rem;
    }

    .step-label {
        display: none;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation button {
        width: 100%;
    }
}

/* File Input Styles */
.form-group input[type="file"] {
    display: none;
}

.file-upload-label {
    display: block;
    padding: 1rem;
    background: var(--soft-lilac);
    border: 2px dashed var(--primary);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.file-upload-label.has-file {
    background: var(--secondary);
    border-style: solid;
    border-color: var(--primary);
}

.file-upload-label i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.file-upload-label.has-file i {
    color: var(--primary);
    transform: scale(1.1);
}

.file-upload-label p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.file-upload-label .file-name {
    margin-top: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

.file-upload-label.has-file .file-name {
    color: var(--primary);
    font-weight: 600;
}

.form-group.has-error .file-upload-label {
    border-color: #dc3545;
}

/* Toast Notifications */
.toastify {
    padding: 16px 24px;
    color: #fff;
    display: flex !important;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(85, 173, 155, 0.15);
    background: greenyellow;
    position: fixed;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    max-width: calc(50% - 20px);
    z-index: 2147483647;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.toastify.on {
    opacity: 1;
    animation: slideIn 0.3s ease-out;
}

.toastify.toastify-success {
    background: var(--primary);
    border-left: 4px solid var(--secondary);
}

.toastify.toastify-error {
    background: #f44336;
    border-left: 4px solid #d32f2f;
}

.toastify.toastify-info {
    background: var(--primary);
    border-left: 4px solid var(--secondary);
}

.toastify.toastify-warning {
    background: #FF9800;
    border-left: 4px solid #F57C00;
}

.toastify-right {
    right: 20px;
}

.toastify-left {
    left: 20px;
}

.toastify-top {
    top: 20px;
}

.toastify-bottom {
    bottom: 20px;
}

.toastify-rounded {
    border-radius: 25px;
}

.toastify-avatar {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toastify-avatar i {
    color: #fff;
    font-size: 16px;
}

.toastify span {
    color: #fff;
    flex: 1;
}

.toastify-center {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    max-width: fit-content;
    max-width: -moz-fit-content;
}

.toastify-close {
    opacity: 0.7;
    padding: 0 5px;
    color: #fff;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.toastify-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media only screen and (max-width: 360px) {

    .toastify-right,
    .toastify-left {
        margin-left: auto;
        margin-right: auto;
        left: 0;
        right: 0;
        max-width: fit-content;
    }

    .toastify {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Form Error Messages */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    padding: 0.5rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

.form-group.has-error .error-message {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Dropdown Styles */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 2px solid rgba(24, 1, 97, 0.1);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select:hover::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 1, 97, 0.1);
}

.custom-select select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 1, 97, 0.1);
}

.custom-select select option {
    padding: 1rem;
    background: white;
    color: var(--text-color);
}

/* Dropdown Animation */
@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select select:focus option {
    animation: dropdownFade 0.3s ease;
}

/* Custom Scrollbar for Dropdown */
.custom-select select::-webkit-scrollbar {
    width: 8px;
}

.custom-select select::-webkit-scrollbar-track {
    background: rgba(24, 1, 97, 0.05);
    border-radius: 4px;
}

.custom-select select::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.custom-select select::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Dropdown States */
.custom-select select:disabled {
    background: rgba(24, 1, 97, 0.05);
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-select.has-error select {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.custom-select.has-error select:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Dropdown with Search */
.custom-select.searchable select {
    padding-left: 2.5rem;
}

.custom-select.searchable::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.5;
    pointer-events: none;
}

/* Dropdown with Icons */
.custom-select.with-icon select {
    padding-left: 2.5rem;
}

.custom-select.with-icon::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Dropdown */
@media (max-width: 768px) {
    .custom-select select {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
        padding-right: 2.2rem;
    }

    .custom-select::after {
        right: 0.8rem;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--primary);
    }
}