body.modal-open .modal-backdrop.show {
    background-color: #102f32;
    opacity: 0.78;
    backdrop-filter: blur(7px);
}

.home-popup-modal .home-popup-dialog {
    width: max-content;
    max-width: min(1100px, calc(100vw - 2rem));
    margin: 1.25rem auto;
}

.home-popup-modal.show .home-popup-dialog {
    animation: home-popup-enter 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-popup-modal .home-popup-card {
    position: relative;
    display: flex;
    max-height: calc(100vh - 2.5rem);
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgb(3 31 33 / 42%);
}

.home-popup-modal .home-popup-visual {
    display: grid;
    min-height: 0;
    place-items: center;
    overflow: auto;
    background: #f5f9f8;
}

.home-popup-modal .home-popup-visual img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(74vh, 760px);
    object-fit: contain;
}

.home-popup-modal .home-popup-close {
    position: absolute;
    z-index: 1;
    top: 12px;
    right: 12px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 68%);
    border-radius: 50%;
    color: #fff;
    background: rgb(16 47 50 / 82%);
    box-shadow: 0 5px 16px rgb(3 31 33 / 24%);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.25rem;
    line-height: 1;
    transition: background-color 180ms ease, transform 180ms ease;
    backdrop-filter: blur(10px);
}

.home-popup-modal .home-popup-close:hover {
    background: #0f766e;
    transform: rotate(90deg);
}

.home-popup-modal .home-popup-close:focus-visible,
.home-popup-modal .home-popup-action:focus-visible {
    outline: 3px solid #d99a22;
    outline-offset: 3px;
}

.home-popup-modal .home-popup-footer {
    max-height: 34vh;
    overflow-y: auto;
    border-top: 1px solid #e6eeee;
    background: #fff;
}

.home-popup-modal .home-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.15rem clamp(1rem, 3vw, 2rem);
}

.home-popup-modal .home-popup-action {
    display: inline-flex;
    min-width: 8rem;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.home-popup-modal .home-popup-action.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.home-popup-modal .home-popup-action.btn-danger:hover,
.home-popup-modal .home-popup-action.btn-danger:focus {
    color: #fff;
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.home-popup-modal .home-popup-action.btn-danger:active,
.home-popup-modal .home-popup-action.btn-danger.active {
    background-color: #b02a37;
    border-color: #a52834;
}

.home-popup-modal .home-popup-action:hover {
    box-shadow: 0 9px 20px rgb(3 31 33 / 18%);
    transform: translateY(-2px);
}

@keyframes home-popup-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767.98px) {
    .home-popup-modal .home-popup-dialog {
        width: max-content;
        max-width: calc(100vw - 1.5rem);
        margin: 0.75rem auto;
    }

    .home-popup-modal .home-popup-card {
        max-height: calc(100vh - 1.5rem);
        border-radius: 18px;
    }

    .home-popup-modal .home-popup-visual img {
        max-height: 66vh;
    }

    .home-popup-modal .home-popup-close {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
    }

    .home-popup-modal .home-popup-actions {
        gap: 0.6rem;
        padding: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .home-popup-modal .home-popup-dialog {
        width: max-content;
        max-width: calc(100vw - 1rem);
    }

    .home-popup-modal .home-popup-card {
        border-radius: 16px;
    }

    .home-popup-modal .home-popup-close {
        top: 8px;
        right: 8px;
        font-size: 1.2rem;
    }

    .home-popup-modal .home-popup-visual img {
        max-height: 58vh;
    }

    .home-popup-modal .home-popup-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .home-popup-modal .home-popup-action {
        width: auto;
        max-width: 100%;
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-popup-modal.show .home-popup-dialog {
        animation: none;
    }

    .home-popup-modal .home-popup-close,
    .home-popup-modal .home-popup-action {
        transition: none;
    }
}
