.apply-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,0.5);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;   /* ⭐ IMPORTANT */

    transition: opacity .25s ease, visibility .25s ease;

    z-index: 999999;
    padding-inline: 30px;
}

.apply-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;   /* ⭐ IMPORTANT */
}

.apply-box {
    width: 100%;
    max-width: 520px;
    background: white;
    padding: 20px;
    border-radius: 15px;

    transform: translateY(30px) scale(.95);
    opacity: 0;

    transition: all .25s ease;
}

.apply-overlay.active .apply-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.apply-box h3 {
    margin-bottom: 15px;
}

.apply-box textarea {
    width: 100%;
    min-height: 120px;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    resize: none;
}

.apply-actions {
    display: flex;
    justify-content: space-between;
}

.btn-submit {
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-cancel {
    background: #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: black;
}

button, h3 {
    text-align: center;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}


@media (max-width: 400px) {
    .apply-box {
        padding: 15px;
    }
}

@media (max-width: 600px) {
    .apply-box {
        width: 100%;
        border-radius: 16px;
    }
}


@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}