/* Shared rotating quick action and same-page form modal. */
.floating-action-switcher {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 9997;
    display: inline-flex;
    min-width: 178px;
    height: 58px;
    align-items: center;
    gap: 10px;
    padding: 7px 18px 7px 8px;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #183f82 0%, #2f6be4 58%, #6449d8 100%);
    box-shadow: 0 16px 38px rgba(10, 36, 80, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
    cursor: pointer;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

@media (min-width: 768px) {
    .whatsapp-btn {
        bottom: 96px !important;
    }
}

.floating-action-switcher:hover,
.floating-action-switcher:focus-visible {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(10, 36, 80, .38), 0 0 0 4px rgba(62, 118, 229, .14);
}

.floating-action-switcher:focus-visible,
.quick-form-modal__close:focus-visible {
    outline: 3px solid #8db3ff;
    outline-offset: 3px;
}

.floating-action-switcher__icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #183f82;
    background: #fff;
    box-shadow: 0 7px 18px rgba(5, 26, 65, .23);
    font-size: 17px;
}

.floating-action-switcher__copy {
    display: grid;
    min-width: 0;
    text-align: left;
    line-height: 1.05;
}

.floating-action-switcher__copy small {
    margin-bottom: 4px;
    color: rgba(255,255,255,.72);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.floating-action-switcher__copy strong {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.floating-action-switcher.is-changing .floating-action-switcher__icon,
.floating-action-switcher.is-changing .floating-action-switcher__copy {
    animation: domestica-action-change .42s ease both;
}

body.quick-form-open { overflow: hidden; }

.quick-form-modal[hidden] { display: none !important; }

.quick-form-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    padding: 26px;
    place-items: center;
}

.quick-form-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4, 15, 35, .58);
    backdrop-filter: blur(10px) saturate(.8);
    -webkit-backdrop-filter: blur(10px) saturate(.8);
    cursor: default;
}

.quick-form-modal__dialog {
    position: relative;
    width: min(960px, 100%);
    height: min(900px, 91vh);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 24px;
    background: #f7f9fd;
    box-shadow: 0 34px 90px rgba(0, 12, 35, .38);
    overflow: hidden;
    /* Keep the iframe out of a transformed compositor layer. Chrome can paint
       the lower part of a transformed iframe as a solid colour on some GPUs. */
    animation: domestica-modal-in .2s ease-out;
}

.quick-form-modal__header {
    display: flex;
    height: 78px;
    align-items: center;
    gap: 13px;
    padding: 12px 16px 12px 20px;
    border-bottom: 1px solid #dce5f2;
    background: rgba(255,255,255,.96);
}

.quick-form-modal__mark {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #173e80, #356fe2);
    box-shadow: 0 9px 22px rgba(31, 76, 153, .25);
}

.quick-form-modal__header > div { min-width: 0; }
.quick-form-modal__header span:not(.quick-form-modal__mark) {
    display: block;
    color: #728199;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.quick-form-modal__header h2 {
    margin: 2px 0 0;
    color: #112e5b;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.1;
}

.quick-form-modal__close {
    display: grid;
    width: 42px;
    height: 42px;
    margin-left: auto;
    place-items: center;
    border: 1px solid #dce5f2;
    border-radius: 50%;
    color: #17315b;
    background: #f5f8fc;
    font-size: 18px;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease, background .2s ease;
}
.quick-form-modal__close:hover { color: #fff; background: #173e80; transform: rotate(6deg); }

.quick-form-modal__body { position: relative; height: calc(100% - 78px); background: #f7f9fd; }
.quick-form-modal__frame { position: relative; z-index: 2; width: 100%; height: 100%; border: 0; background: #fff; }
.quick-form-modal__loader {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    color: #536681;
    background: #f7f9fd;
}
.quick-form-modal__loader span {
    width: 38px;
    height: 38px;
    border: 3px solid #d8e3f3;
    border-top-color: #326de0;
    border-radius: 50%;
    animation: domestica-loader .8s linear infinite;
}
.quick-form-modal__loader p { margin: 0; font-size: 13px; font-weight: 700; }
.quick-form-modal.is-loaded .quick-form-modal__loader { display: none; }

/* Do not repeat the global floating controls inside the embedded form frame. */
.hire-staff-form-lite .floating-action-switcher,
.hire-staff-form-lite .quick-form-modal,
.hire-staff-form-lite .scroll-up,
.hire-staff-form-lite .whatsapp-btn,
.apply-job-form-lite .floating-action-switcher,
.apply-job-form-lite .quick-form-modal,
.apply-job-form-lite .scroll-up,
.apply-job-form-lite .whatsapp-btn { display: none !important; }

@media (max-width: 767px) {
    .floating-action-switcher {
        right: auto;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        min-width: 0;
        width: min(172px, calc(100vw - 148px));
        height: 52px;
        padding: 5px 13px 5px 6px;
        gap: 8px;
        transform: translateX(-50%);
    }
    .floating-action-switcher:hover,
    .floating-action-switcher:focus-visible { transform: translateX(-50%) translateY(-2px); }
    .floating-action-switcher__icon { flex-basis: 40px; width: 40px; height: 40px; font-size: 15px; }
    .floating-action-switcher__copy small { display: none; }
    .floating-action-switcher__copy strong { font-size: 12px; }
    .quick-form-modal { padding: 8px; align-items: stretch; }
    .quick-form-modal__dialog { width: 100%; height: calc(100dvh - 16px); max-height: none; border-radius: 20px; }
    .quick-form-modal__header { height: 70px; padding: 10px 12px 10px 14px; }
    .quick-form-modal__mark { flex-basis: 40px; width: 40px; height: 40px; border-radius: 12px; }
    .quick-form-modal__body { height: calc(100% - 70px); }
    .quick-form-modal__close { width: 40px; height: 40px; }
}

@media (max-width: 360px) {
    .floating-action-switcher { width: 148px; }
    .floating-action-switcher__copy strong { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .quick-form-modal__dialog { animation: none; }
}
@keyframes domestica-action-change {
    0% { opacity: 1; transform: translateY(0); }
    48% { opacity: 0; transform: translateY(-6px); }
    52% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes domestica-modal-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes domestica-loader { to { transform: rotate(360deg); } }
