/* Application Modal Styles */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.application-modal {
    background: var(--white);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #E67E22 0%, #F39C12 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    opacity: 0.95;
    font-size: 0.95rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 2rem;
}

.job-info {
    background: var(--light);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.job-info h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.job-info .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.job-info .meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Application Form */
.application-form .form-group {
    margin-bottom: 1.5rem;
}

.application-form label {
    display: block;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.application-form label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

.application-form input[type="text"],
.application-form input[type="email"],
.application-form input[type="tel"],
.application-form textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.application-form input:focus,
.application-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.application-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 2px dashed var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(230, 126, 34, 0.05);
}

.file-upload-label.has-file {
    border-color: var(--accent-color);
    background: rgba(22, 160, 133, 0.1);
}

.file-upload-icon {
    font-size: 2rem;
}

.file-upload-text {
    text-align: center;
}

.file-upload-text .main-text {
    color: var(--dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.file-upload-text .sub-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.file-name {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(22, 160, 133, 0.1);
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remove-file {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light);
}

.form-actions .btn {
    flex: 1;
}

.btn-submit {
    background: linear-gradient(135deg, #E67E22 0%, #F39C12 100%);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel {
    background: var(--light);
    color: var(--dark);
    padding: 1rem 2rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: var(--white);
    border-color: var(--text-light);
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.success-message.active {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: var(--white);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h3 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.success-message p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.success-message .btn {
    padding: 1rem 2rem;
}

/* Error Messages */
.error-message {
    background: #FADBD8;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    border: 2px solid var(--danger);
}

.error-message.active {
    display: block;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .application-modal {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        border-radius: 0;
    }
}
/* Application modal mobile */
@media (max-width: 768px) {
  .modal-content { padding: 20px; margin: 10px; border-radius: 16px; max-height: 90vh; overflow-y: auto; }
  .modal-header h2 { font-size: 1.2rem; }
  input, select, textarea { font-size: 16px !important; }
}
