/* Reusable SweetAlert-style service failure dialog shown after returning back. */
.service-error-dialog {
    width: min(92vw, 470px);
    max-width: 470px;
    max-height: min(88vh, 680px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 20px;
    color: #172b40;
    background: transparent;
    box-shadow: 0 24px 80px rgb(12 35 57 / 28%);
}

.service-error-dialog::backdrop { background: rgb(9 24 40 / 58%); backdrop-filter: blur(3px); }
.service-error-dialog__panel { position: relative; padding: 34px 30px 27px; border: 1px solid #e4e9ee; border-radius: inherit; background: #fff; text-align: center; font-family: inherit; }
.service-error-dialog__icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 17px; border: 1px solid #f1dfb5; border-radius: 50%; color: #a87920; background: #fff8e8; font-size: 25px; }
.service-error-dialog__panel h2 { margin: 0 0 10px; color: #12304d; font-size: clamp(18px, 3vw, 22px); font-weight: 700; line-height: 1.55; }
.service-error-dialog__panel p { margin: 0; color: #58697b; font-size: 14px; line-height: 1.9; }
.service-error-dialog__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.service-error-dialog__button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; border: 1px solid #dce3e9; border-radius: 10px; color: #12304d; background: #fff; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.service-error-dialog__button:hover { transform: translateY(-1px); border-color: #b68a35; }
.service-error-dialog__button:focus-visible { outline: 3px solid rgb(182 138 53 / 40%); outline-offset: 2px; }
.service-error-dialog__button--contact { border-color: #a97b2c; color: #fff; background: #a97b2c; }
.service-error-dialog__button--contact:hover { border-color: #8d6525; color: #fff; background: #8d6525; }
.service-error-dialog[open] { animation: service-error-enter .22s ease-out both; }

@keyframes service-error-enter {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
    .service-error-dialog { width: calc(100vw - 28px); border-radius: 16px; }
    .service-error-dialog__panel { padding: 29px 19px 21px; }
    .service-error-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .service-error-dialog__button { min-width: 0; padding-inline: 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .service-error-dialog[open] { animation: none; }
}
