/* VIA Derm — анимированное окно "Заявка отправлена". Золото + бежевый. */

.via-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 80% at 50% 50%, rgba(8,9,12,.78) 0%, rgba(8,9,12,.92) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    padding: 16px;
}
.via-success-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.via-success-card {
    position: relative;
    background: linear-gradient(160deg, #15140e 0%, #0a0a07 100%);
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 20px;
    padding: 60px 44px 44px;
    width: min(460px, 100%);
    text-align: center;
    color: #f5e8c8;
    overflow: hidden;
    box-shadow:
        0 40px 90px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(212, 175, 55, .08),
        inset 0 1px 0 rgba(212, 175, 55, .25);
    transform: translateY(28px) scale(.94);
    opacity: 0;
    transition: transform .55s cubic-bezier(.18,.9,.32,1.25), opacity .35s ease;
}
.via-success-overlay.is-open .via-success-card {
    transform: none;
    opacity: 1;
}

/* Тёплое золотое свечение сверху */
.via-success-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(212, 175, 55, .22), transparent 60%),
        radial-gradient(80% 50% at 50% 100%, rgba(212, 175, 55, .08), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Тонкий бежевый бордюрный блик */
.via-success-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(243, 213, 122, .55), rgba(212, 175, 55, .05) 40%, rgba(243, 213, 122, .35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.via-success-check {
    width: 104px;
    height: 104px;
    margin: 0 auto 26px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 28%, #f7e29a 0%, #d4af37 55%, #a07d18 100%);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    box-shadow:
        0 0 0 6px rgba(212, 175, 55, .10),
        0 0 0 14px rgba(212, 175, 55, .05),
        0 18px 42px rgba(212, 175, 55, .38),
        inset 0 -6px 12px rgba(122, 92, 14, .35),
        inset 0 6px 10px rgba(255, 235, 175, .35);
}
.via-success-check svg {
    width: 54px;
    height: 54px;
    stroke: #14140e;
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,.25));
}
.via-success-overlay.is-open .via-success-check {
    animation: viaCheckPop .65s cubic-bezier(.18, .9, .3, 1.45) both;
}
.via-success-overlay.is-open .via-success-check svg {
    animation: viaCheckDraw .55s cubic-bezier(.6, 0, .3, 1) .28s forwards;
}
@keyframes viaCheckPop {
    0%   { transform: scale(.35) rotate(-12deg); opacity: 0; }
    60%  { transform: scale(1.1)  rotate(2deg);  opacity: 1; }
    100% { transform: scale(1)    rotate(0);     opacity: 1; }
}
@keyframes viaCheckDraw { to { stroke-dashoffset: 0; } }

/* Расходящееся золотое кольцо */
.via-success-check::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(243, 213, 122, .6);
    opacity: 0;
}
.via-success-overlay.is-open .via-success-check::after {
    animation: viaRing 1.1s ease-out .25s 1 forwards;
}
@keyframes viaRing {
    0%   { transform: scale(.95); opacity: .7; }
    100% { transform: scale(1.6); opacity: 0;  }
}

.via-success-title {
    font-family: inherit;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: .005em;
    margin: 0 0 12px;
    background: linear-gradient(180deg, #f6dd8a 0%, #d4af37 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #f3d57a;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s ease .35s, transform .4s ease .35s;
}
.via-success-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(245, 232, 200, .82);
    margin: 0;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s ease .45s, transform .4s ease .45s;
}
.via-success-overlay.is-open .via-success-title,
.via-success-overlay.is-open .via-success-text {
    opacity: 1;
    transform: none;
}

.via-success-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #f6dd8a);
    z-index: 2;
}
.via-success-overlay.is-open .via-success-progress {
    animation: viaProgress 4.5s linear forwards;
}
@keyframes viaProgress { to { width: 100%; } }

.via-success-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: rgba(245, 232, 200, .55);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    z-index: 3;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.via-success-close:hover,
.via-success-close:focus-visible {
    background: rgba(212, 175, 55, .14);
    color: #f3d57a;
    transform: rotate(90deg);
    outline: none;
}

/* Искры */
.via-success-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f3d57a;
    box-shadow: 0 0 12px rgba(243, 213, 122, .9);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}
.via-success-overlay.is-open .via-success-spark {
    animation: viaSparkle 1.4s ease-out forwards;
}
@keyframes viaSparkle {
    0%   { opacity: 0; transform: translate(0, 0) scale(.4); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: var(--via-end, translate(0,0)) scale(1.1); }
}

@media (max-width: 480px) {
    .via-success-card     { padding: 48px 24px 36px; border-radius: 16px; }
    .via-success-check    { width: 88px; height: 88px; margin-bottom: 20px; }
    .via-success-check svg{ width: 46px; height: 46px; }
    .via-success-title    { font-size: 24px; }
    .via-success-text     { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .via-success-overlay,
    .via-success-card,
    .via-success-check,
    .via-success-check svg,
    .via-success-check::after,
    .via-success-spark,
    .via-success-title,
    .via-success-text,
    .via-success-progress {
        animation: none !important;
        transition: opacity .2s ease !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 1;
    }
}
