/* Apply Form Modal */
/* Override parent theme global.min.css input styles - must be more specific */
.apply-form-modal input[type=text],
.apply-form-modal input[type=email],
.apply-form-modal input[type=url],
.apply-form-modal input[type=password],
.apply-form-modal input[type=search],
.apply-form-modal input[type=number],
.apply-form-modal input[type=tel],
.apply-form-modal input[type=range],
.apply-form-modal input[type=date],
.apply-form-modal input[type=month],
.apply-form-modal input[type=week],
.apply-form-modal input[type=time],
.apply-form-modal input[type=datetime],
.apply-form-modal input[type=datetime-local],
.apply-form-modal input[type=color],
.apply-form-modal input[type=file],
.apply-form-modal textarea {
    color: var(--global-palette4) !important;
}

.apply-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.apply-form-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.apply-form-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.apply-form-modal__container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.apply-form-modal.is-open .apply-form-modal__container {
    transform: scale(1);
}

.apply-form-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--blue-line, #e0e0e0);
}

.apply-form-modal__title {
    font-family: var(--font-header);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--global-palette3);
    margin: 0;
}

.apply-form-modal__close {
    background: transparent !important;
    border: none !important;
    font-size: 2rem;
    color: var(--global-palette4) !important;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-weight: 300;
}

.apply-form-modal__close:hover,
.apply-form-modal__close:focus {
    color: var(--global-palette3) !important;
    background: transparent !important;
}

/* Apply Form */
.apply-form {
    padding: 2rem;
}

.apply-form__position-info {
    background: #f5f5f5;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--global-palette4);
    line-height: 1.4;
}

.apply-form__position-info p {
    margin: 0;
}

.apply-form__position-info strong {
    color: var(--global-palette3);
    font-weight: 600;
}

.apply-form__field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.apply-form__field {
    margin-bottom: 1.5rem;
}

.apply-form__field--half {
    margin-bottom: 0;
}

.apply-form__label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--global-palette3);
    margin-bottom: 0.5rem;
}

.apply-form__required {
    color: #d9534f;
}

.apply-form__input,
.apply-form__textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--blue-line, #e0e0e0);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--global-palette4) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apply-form__input:focus,
.apply-form__input:active,
.apply-form__input:focus-visible,
.apply-form__textarea:focus,
.apply-form__textarea:active,
.apply-form__textarea:focus-visible {
    outline: none !important;
    border-color: var(--global-palette1) !important;
    color: var(--global-palette4) !important;
    box-shadow: 0 0 0 3px rgba(154, 116, 76, 0.15) !important;
}

.apply-form__textarea {
    resize: vertical;
    min-height: 80px;
}

.apply-form__file {
    padding: 0.5rem;
    cursor: pointer;
}

.apply-form__file::-webkit-file-upload-button {
    padding: 0.5rem 1rem;
    background-color: var(--global-palette3);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-right: 1rem;
    transition: background-color 0.2s ease;
}

.apply-form__file::-webkit-file-upload-button:hover {
    background-color: var(--global-palette1);
}

.apply-form__help {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #666;
}

.apply-form__messages {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.apply-form__messages--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.apply-form__messages--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.apply-form__messages p {
    margin: 0;
}

.apply-form__actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--blue-line, #e0e0e0);
}

.apply-form__cancel,
.apply-form__submit {
    padding: 0.75rem 1.5rem !important;
    border-radius: 4px !important;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.apply-form__cancel {
    background-color: var(--global-palette8) !important;
    color: var(--global-palette4) !important;
    border: 1px solid var(--blue-line, #e0e0e0) !important;
}

.apply-form__cancel:hover,
.apply-form__cancel:focus,
.apply-form__cancel:active {
    background-color: var(--global-palette2) !important;
    color: var(--global-palette3) !important;
    border-color: var(--global-palette2) !important;
}

.apply-form__submit {
    background-color: var(--global-palette3) !important;
    color: #fff !important;
    border: none !important;
}

.apply-form__submit:hover,
.apply-form__submit:focus,
.apply-form__submit:active {
    background-color: var(--global-palette1) !important;
    color: #fff !important;
}

.apply-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-form__submit-spinner {
    display: inline-block;
    margin-left: 0.5rem;
}

.apply-form__submit-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
/* Flash Message */
.apply-flash-message {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #5cb85c;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.apply-flash-message.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.apply-flash-message p {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .apply-form-modal__container {
        width: 95%;
        max-height: 95vh;
    }
    
    .apply-flash-message {
        top: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

    .apply-form-modal__header {
        padding: 1rem 1.5rem;
    }

    .apply-form-modal__title {
        font-size: 1.5rem;
    }

    .apply-form {
        padding: 1.5rem;
    }

    .apply-form__field-group {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .apply-form__field--half {
        margin-bottom: 1.5rem;
    }

    .apply-form__actions {
        flex-direction: column-reverse;
    }

    .apply-form__cancel,
    .apply-form__submit {
        width: 100%;
    }
}
