/* ── JOBBEAST Apply – Modal CSS ── */

/* Overlay */
.jba-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: jba-fade-in 0.2s ease;
}
.jba-modal-overlay[hidden] {
    display: none !important;
}
@keyframes jba-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Box */
.jba-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    animation: jba-slide-up 0.25s cubic-bezier(.16,1,.3,1);
}
@keyframes jba-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.jba-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 2;
}
.jba-modal-close:hover { background: rgba(255,255,255,.3); }

/* Header */
.jba-modal-header {
    background: linear-gradient(135deg, #522033 0%, #3d1726 100%);
    padding: 24px 28px 22px;
    border-radius: 14px 14px 0 0;
}
.jba-modal-logo {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.jba-modal-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.jba-modal-title .jba-job-name {
    font-weight: 400;
    font-size: 17px;
    opacity: .9;
}

/* Form */
.jba-form {
    padding: 24px 28px 28px;
}
.jba-form-row {
    margin-bottom: 16px;
}
.jba-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .jba-two-col { grid-template-columns: 1fr; }
}
.jba-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.jba-req { color: #522033; }
.jba-hint-inline {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}
.jba-field input[type="text"],
.jba-field input[type="email"],
.jba-field input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    color: #222;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: #fafafa;
}
.jba-field input:focus {
    outline: none;
    border-color: #522033;
    box-shadow: 0 0 0 3px rgba(82,32,51,.12);
    background: #fff;
}
.jba-field input.jba-error {
    border-color: #e53935;
}

/* Upload zone */
.jba-upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    position: relative;
    overflow: hidden;
}
.jba-upload-zone.jba-drag-over {
    border-color: #522033;
    background: #f9f5f7;
}
.jba-upload-zone .jba-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.jba-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
    gap: 6px;
}
.jba-upload-icon { font-size: 26px; }
.jba-upload-text {
    font-size: 13px;
    color: #555;
    text-align: center;
}

/* File list */
.jba-file-list {
    padding: 0 12px 10px;
}
.jba-file-list:empty { display: none; }
.jba-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f0f2;
    border: 1px solid #d4b0bc;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    color: #3d1726 !important;
    margin: 4px 4px 0 0;
}
.jba-file-chip-remove {
    background: none !important;
    border: none !important;
    color: #3d1726 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 0 0 0 2px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    border-radius: 0 !important;
}

/* Error notice */
.jba-notice--error {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    padding: 10px 14px;
    color: #b91c1c;
    font-size: 13px;
}

/* Submit */
.jba-form-actions {
    margin-top: 20px;
}
.jba-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #522033, #3d1726);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity .15s, transform .1s;
}
.jba-submit-btn:hover { opacity: .9; }
.jba-submit-btn:active { transform: scale(.99); }
.jba-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Spinner */
.jba-submit-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jba-spin .7s linear infinite;
}
@keyframes jba-spin {
    to { transform: rotate(360deg); }
}

/* Apply wrap / button */
.jba-apply-wrap {
    margin: 12px 0;
}

/* Success screen */
.jba-success {
    padding: 48px 28px;
    text-align: center;
}
.jba-success[hidden] { display: none; }
.jba-success-icon { font-size: 48px; margin-bottom: 16px; }
.jba-success h3 {
    font-size: 20px;
    color: #222;
    margin: 0 0 10px;
}
.jba-success p {
    color: #555;
    font-size: 14px;
    margin: 0 0 24px;
}
.jba-success-close {
    position: static;
    background: #522033;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    height: auto;
}
.jba-success-close:hover { opacity: .9; }


/* Theme-Override: Upload Zone Text */
.jba-modal-overlay .jba-upload-text,
.jba-modal-overlay .jba-upload-label span,
.jba-modal-overlay .jba-field label,
.jba-modal-overlay .jba-hint-inline {
    color: #555 !important;
}

.jba-modal-overlay .jba-file-chip,
.jba-modal-overlay .jba-file-chip * {
    color: #3d1726 !important;
}
/* Chip Remove Button über dem File-Input */
.jba-file-chip-remove {
    position: relative;
    z-index: 10;
}

/* Theme-Override: Eingabefelder */
.jba-modal-overlay .jba-field input[type="text"],
.jba-modal-overlay .jba-field input[type="email"],
.jba-modal-overlay .jba-field input[type="tel"] {
    color: #333 !important;
    background: #fafafa !important;
}

.jba-modal-overlay .jba-field input::placeholder {
    color: #aaa !important;
}

/* Theme-Override: Fehlermeldung */
.jba-modal-overlay .jba-notice--error {
    color: #b91c1c !important;
    background: #fff0f0 !important;
}

.jba-modal-overlay .jba-form .jba-pflichtfeld-hinweis {
    font-size: 13px !important;
    color: #888 !important;
    margin: 0 !important;
}
.jba-modal-overlay .jba-req {
    color: #522033 !important;
}