/* =========================================================================
   Shared "sending..." overlay — used on every form across admin + public site.
   Relies on the color variables already defined in bootstrap-theme.css.
   ========================================================================= */
.itw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.itw-modal-overlay.itw-open {
    display: flex;
    animation: itwFadeIn .18s ease-out;
}
@keyframes itwFadeIn { from { opacity: 0; } to { opacity: 1; } }

.itw-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 340px;
    width: 100%;
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    animation: itwPopIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes itwPopIn {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.itw-mail-stage {
    position: relative;
    width: 84px; height: 84px;
    margin: 0 auto 1.1rem;
}
.itw-mail-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem;
    color: var(--bs-primary, #ff6f51);
    background: var(--sky, #eaf4f5);
    border-radius: 50%;
    animation: itwMailFloat 1.1s ease-in-out infinite;
}
@keyframes itwMailFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-7px) rotate(-4deg); }
}
.itw-mail-check {
    position: absolute; inset: 0;
    display: none;
    align-items: center; justify-content: center;
    font-size: 2.6rem;
    color: #fff;
    background: #2f9e63;
    border-radius: 50%;
    transform: scale(0);
}
.itw-mail-stage.itw-sent .itw-mail-icon { display: none; }
.itw-mail-stage.itw-sent .itw-mail-check {
    display: flex;
    animation: itwCheckPop .38s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes itwCheckPop { to { transform: scale(1); } }

.itw-mail-stage.itw-error .itw-mail-icon {
    animation: none;
    color: #e5484d;
    background: #fce9e9;
}

.itw-modal-title { font-weight: 700; font-size: 1.15rem; margin-bottom: .4rem; color: #16324a; }
.itw-modal-text { color: #6d7178; font-size: .92rem; margin-bottom: 1.4rem; }

.itw-dots span { animation: itwDotBlink 1.2s infinite; opacity: 0; }
.itw-dots span:nth-child(2) { animation-delay: .2s; }
.itw-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes itwDotBlink { 0%, 20% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

.itw-progress {
    width: 100%; height: 6px;
    background: #e9e6dd;
    border-radius: 999px;
    overflow: hidden;
}
.itw-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bs-primary, #ff6f51), #2c8c9b);
    border-radius: 999px;
    transition: width .35s ease;
}
.itw-progress-bar.itw-complete { background: #2f9e63; }
.itw-progress-bar.itw-error { background: #e5484d; }

.itw-modal-actions { margin-top: 1.2rem; }

/* Auto-hide flash alerts (used for the 5s "sent" message on the customer form) */
.itw-flash-autohide { transition: opacity .5s ease; }
