/* Standalone by design: the first paint must not wait for Odoo's lazy assets. */
.ct-page-loading {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    place-items: center;
    padding: 24px;
    background: #fff;
    color: #0b0f14;
    font: 400 14px/1.5 Arial, sans-serif;
    text-align: center;
    /* Safety, not decoration: keep this deadline even with reduced motion. */
    animation: ct-page-loading-release 10s steps(1, end) forwards;
}

html.ct-page-loading-active .ct-page-loading { display: grid; }
.ct-page-loading[hidden] { display: none !important; }
.ct-page-loading__content { display: grid; justify-items: center; gap: 10px; max-width: 320px; }
.ct-brand-loader__mark {
    display: grid;
    place-items: center;
    position: relative;
    width: 104px;
    height: 104px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #fff9df;
    box-shadow: 0 12px 40px #ffc40024;
}
.ct-brand-loader__mark::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid #ffc40026;
    border-top-color: #ffc400;
    border-radius: inherit;
    animation: ct-page-loading-orbit 1.8s linear infinite;
}
.ct-brand-loader__mark img {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    animation: ct-page-loading-breathe 2.2s ease-in-out infinite alternate;
}
.ct-page-loading__brand { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.ct-page-loading__status { margin: 0; color: #657080; font-size: 13px; }
.ct-page-loading__dismiss {
    margin-top: 20px;
    padding: 10px 16px;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    background: #fff;
    color: #5b6370;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.ct-page-loading__dismiss:hover { color: #0b0f14; border-color: #ffc400; }
.ct-page-loading__dismiss:focus-visible { outline: 3px solid #ffc400; outline-offset: 3px; }

/* Reuse existing busy states; never replace form, request or dialog lifecycles. */
body.o_calltech_portal_body .ct-phone-dialog form[aria-busy="true"] button[type="submit"]::after {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border-radius: 50%;
    background: #0b0f14 url('/calltech_portal_core/static/description/icon.png') center / contain no-repeat;
    animation: ct-page-loading-breathe 1s ease-in-out infinite alternate;
}

@keyframes ct-page-loading-orbit { to { transform: rotate(1turn); } }
@keyframes ct-page-loading-breathe { from { transform: scale(.94); } to { transform: scale(1); } }
@keyframes ct-page-loading-release { to { visibility: hidden; opacity: 0; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) {
    .ct-brand-loader__mark::before,
    .ct-brand-loader__mark img,
    body.o_calltech_portal_body .ct-phone-dialog form[aria-busy="true"] button[type="submit"]::after { animation: none; }
}
@media print { .ct-page-loading { display: none !important; } }
