/* Careers application modal — matches contact form / theme tokens */
button.btn-design {
    border: none;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    text-decoration: none;
}

.careers-modal {
    position: fixed;
    inset: 0;
    /* فوق لوحة القائمة (#menu.menu--contact-only z-index ~10060) */
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.careers-modal.careers-modal--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.careers-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 22, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.careers-modal__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: min(92vh, 900px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--body-color);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.careers-modal.careers-modal--open .careers-modal__panel {
    transform: translateY(0) scale(1);
}

.careers-modal__scroll {
    overflow-y: auto;
    padding: 40px 36px 36px;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 576px) {
    .careers-modal__scroll {
        padding: 32px 20px 28px;
    }
}

.careers-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--princing-box-border);
    color: var(--main-text);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.careers-modal__close:hover {
    background: var(--main-text);
    color: var(--body-color);
}

.careers-modal__close i {
    font-size: 22px;
    line-height: 1;
}

.careers-modal__title-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    padding-right: 48px;
}

.careers-modal__title-block h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 400;
    font-family: "Marcellus", serif;
    line-height: 1.2;
    color: var(--main-text);
    margin: 0;
}

.careers-modal__title-block p {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
}

.careers-modal__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.careers-modal__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 576px) {
    .careers-modal__row {
        grid-template-columns: 1fr;
    }
}

.careers-modal__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.careers-modal__field label {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--main-text);
}

.careers-modal__field .careers-modal__hint {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-color);
    margin-top: -4px;
}

.careers-modal__field input[type="text"],
.careers-modal__field input[type="email"],
.careers-modal__field input[type="tel"],
.careers-modal__field input[type="url"],
.careers-modal__field select,
.careers-modal__field textarea {
    width: 100%;
    background-color: var(--princing-box-border);
    border: 2px solid transparent;
    padding: 12px 15px;
    font-size: 17px;
    line-height: 1.4;
    color: var(--text-color);
    font-family: "DM Sans", system-ui, sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.careers-modal__field select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23595959' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.careers-modal__field textarea {
    min-height: 120px;
    resize: vertical;
    max-height: 220px;
}

.careers-modal__field textarea.custom-textarea {
    max-height: 220px !important;
    width: 100%;
}

.careers-modal__field input:focus,
.careers-modal__field select:focus,
.careers-modal__field textarea:focus {
    border-color: var(--template-data);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--template-data) 25%, transparent);
}

.careers-modal__field--error input,
.careers-modal__field--error select,
.careers-modal__field--error textarea {
    border-color: #c53030;
}

.careers-modal__error {
    font-size: 14px;
    color: #c53030;
    margin: 0;
}

.careers-file {
    position: relative;
}

.careers-file__input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.careers-file__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    padding: 20px 16px;
    background: var(--princing-box-border);
    border: 2px dashed color-mix(in srgb, var(--main-text) 22%, transparent);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.careers-file__zone:hover,
.careers-file__zone:focus-within {
    border-color: var(--template-data);
    background: color-mix(in srgb, var(--template-data) 6%, var(--princing-box-border));
}

.careers-file__zone i {
    font-size: 32px;
    color: var(--template-data);
    line-height: 1;
}

.careers-file__zone strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-text);
}

.careers-file__zone span {
    font-size: 14px;
    color: var(--text-color);
}

.careers-file__name {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    color: var(--main-text);
    word-break: break-all;
}

.careers-modal__submit {
    margin-top: 8px;
}

.careers-modal__submit .btn-mark {
    cursor: pointer;
    font-family: inherit;
}

.careers-modal__submit .btn-mark:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.careers-modal__status {
    font-size: 16px;
    line-height: 1.5;
    padding: 14px 16px;
    border-radius: 4px;
    display: none;
}

.careers-modal__status.is-visible {
    display: block;
}

.careers-modal__status--success {
    background: color-mix(in srgb, #198754 12%, var(--body-color));
    color: #0d4f2b;
    border: 1px solid color-mix(in srgb, #198754 35%, transparent);
}

.careers-modal__status--error {
    background: color-mix(in srgb, #dc3545 10%, var(--body-color));
    color: #842029;
    border: 1px solid color-mix(in srgb, #dc3545 30%, transparent);
}

.careers-modal__success-view {
    display: none;
    text-align: center;
    padding: 24px 8px 8px;
}

.careers-modal__success-view.is-visible {
    display: block;
}

.careers-modal__success-view .careers-modal__icon-ok {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--template-data) 18%, var(--body-color));
    color: var(--template-data);
    font-size: 32px;
}

.careers-modal__success-view h3 {
    font-family: "Marcellus", serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--main-text);
    margin: 0 0 12px;
}

.careers-modal__success-view p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-color);
    margin: 0;
}

body.careers-modal-open {
    overflow: hidden;
}
