/* ============================================================
   SvcConnect - shared "connecting to an external web service" dialog.
   One small centered card that morphs in place: connecting steps -> result.
   Patterned after the session-timeout overlay (#darmhaStoOverlay in
   Site.Master) - same overlay/card/gradient-header language.
   Muted, state-site-appropriate palette - no bright/saturated colors.
   ============================================================ */

.svc-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(13,28,56,0.15);
    z-index: 9995;
    align-items: center;
    justify-content: center;
}
.svc-card {
    width: 360px; max-width: 92vw;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 24px 70px rgba(13,28,56,0.45), 0 4px 14px rgba(13,28,56,0.18);
    overflow: hidden;
}
.svc-card-header {
    color: #fff;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
    /* Site blue, light tone — brighter sky blue, not the dark navy end of the brand gradient.
       Light stop deepened slightly from the first pass (#5aa3e8) — it read fine against the
       icon/title but sat close to failing contrast for bold white header text at that corner. */
    background: linear-gradient(135deg,#4a93da 0%,#2f6fd0 100%);
    transition: background 0.25s ease;
}
.svc-card-header.success { background: linear-gradient(135deg,#5ec488 0%,#3fa869 100%); }
.svc-card-header.failed  { background: linear-gradient(135deg,#f28b7d 0%,#e2584a 100%); }
/* Warning's light stop was the flagged case (#f8c477 — too pale for white bold text); deepened
   to #eba552 while keeping it visibly the lightest of the four states. */
.svc-card-header.warning { background: linear-gradient(135deg,#eba552 0%,#d68c1f 100%); }
.svc-card-icon {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.svc-card-title { font-weight: 700; font-size: 13.5px; }
.svc-card-subtitle { font-size: 11px; opacity: 0.85; margin-top: 1px; }

.svc-card-body { padding: 22px 20px 8px 20px; text-align: center; }

@keyframes svcConnectPulse {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.28); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.28); }
    70%  { transform: scale(1); }
    100% { transform: scale(1); }
}
.svc-step-icon {
    width: 54px; height: 54px; margin: 0 auto 12px auto;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #eaf2fb 0%, #dce9f7 100%);
    box-shadow: 0 0 0 6px rgba(0, 46, 109,0.06);
}
.svc-step-icon i {
    color: #002e6d;
    font-size: 22px;
    animation: svcConnectPulse 1.1s ease-in-out infinite;
}
.svc-step-label { font-size: 13.5px; font-weight: 700; color: #002e6d; min-height: 18px; transition: opacity 0.15s ease; }
/* Minimal connecting state: flat white card, no header - an animated
   "beaming" satellite icon on top, then two lines of copy:
   line 1 = the cycling step ("Connecting..."), line 2 = a quiet
   "Please wait for a moment..." subline. */
.svc-connecting-min { padding: 28px 16px 30px 16px; text-align: center; }
.svc-beam-icon {
    position: relative;
    width: 52px; height: 52px;
    margin: 0 auto 12px auto;
    display: flex; align-items: center; justify-content: center;
}
.svc-beam-icon i {
    font-size: 22px;
    color: #2f6fd0;
    position: relative;
    z-index: 1;
}
/* Beaming: two rings expanding outward from the dish, staggered. */
.svc-beam-icon::before,
.svc-beam-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(47,111,208,0.45);
    border-radius: 50%;
    animation: svcBeam 1.8s ease-out infinite;
}
.svc-beam-icon::after { animation-delay: 0.9s; }
@keyframes svcBeam {
    0%   { transform: scale(0.45); opacity: 0.9; }
    100% { transform: scale(1.25); opacity: 0; }
}
.svc-connecting-line1 { color: #1c2d44; }
.svc-connecting-line2 { margin-top: 4px; font-size: 11.5px; color: #6b7a90; }
@media (prefers-reduced-motion: reduce) {
    .svc-beam-icon::before, .svc-beam-icon::after { animation: none; opacity: 0.35; transform: scale(0.9); }
}

@keyframes svcResultPop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.svc-result-icon {
    width: 54px; height: 54px; margin: 0 auto 10px auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    animation: svcResultPop 0.35s cubic-bezier(.34,1.56,.64,1);
}
.svc-result-icon.success { background: #e6f5ec; color: #3fa869; }
.svc-result-icon.failed  { background: #fbeae8; color: #e2584a; }
.svc-result-icon.warning { background: #fdf1e0; color: #f0a13f; }
.svc-result-message { font-size: 13px; color: #506080; line-height: 1.5; margin-top: 2px; }
.svc-result-ref {
    display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 12px;
    background: #f2f5f9; color: #5b6b80; font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.svc-back-row {
    display: block; margin-top: 12px;
    font-size: 12px; color: #506080; cursor: pointer; user-select: none;
}
.svc-back-row input[type="checkbox"] {
    vertical-align: middle; margin: 0 5px 2px 0; cursor: pointer;
}

.svc-card-footer { padding: 14px 20px 18px 20px; display: none; justify-content: center; }
.svc-card-footer.show { display: flex; }
.svc-btn-ok {
    flex: 1; max-width: 160px; padding: 10px; border: none; border-radius: 8px;
    color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
    background: linear-gradient(180deg,#4a93da 0%,#2f6fd0 100%);
}
.svc-btn-ok.success { background: linear-gradient(180deg,#5ec488 0%,#3fa869 100%); }
.svc-btn-ok.failed  { background: linear-gradient(180deg,#f28b7d 0%,#e2584a 100%); }
.svc-btn-ok.warning { background: linear-gradient(180deg,#eba552 0%,#d68c1f 100%); }
