/*
 * Popup komunikatów — Polka Travel
 * Klasy są odseparowane prefiksem pt-popup, aby nie kolidowały z Bootstrapem.
 */

html.pt-popup-open,
html.pt-popup-open body {
    overflow: hidden;
}

.pt-popup[hidden] {
    display: none !important;
}

.pt-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(17, 17, 17, 0.68);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.pt-popup.is-visible {
    opacity: 1;
    visibility: visible;
}

.pt-popup__dialog {
    position: relative;
    width: min(100%, 520px);
    margin: auto;
    padding: 46px 42px 38px;
    overflow: hidden;
    color: #191919;
    text-align: center;
    background: #ffffff;
    border-top: 5px solid #71cf3a;
    border-radius: 18px;
    box-shadow: 0 24px 75px rgba(0, 0, 0, 0.28);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.22s ease;
}

.pt-popup.is-visible .pt-popup__dialog {
    transform: translateY(0) scale(1);
}

.pt-popup__dialog::before {
    position: absolute;
    top: -110px;
    right: -100px;
    width: 250px;
    height: 250px;
    content: "";
    pointer-events: none;
    background: rgba(113, 207, 58, 0.10);
    border-radius: 50%;
}

.pt-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #1b1b1b;
    background: #c1c1c1;
    border: 0;
    border-radius: 50%;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.pt-popup__close span {
    display: block;
    margin-top: -2px;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

.pt-popup__close:hover {
    color: #ffffff;
    background: #71cf3a;
    transform: rotate(4deg);
}

.pt-popup__close:focus-visible,
.pt-popup__button:focus-visible {
    outline: 3px solid rgba(113, 207, 58, 0.35);
    outline-offset: 3px;
}

.pt-popup__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    color: #ffffff;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    background: #71cf3a;
    border: 8px solid rgba(113, 207, 58, 0.16);
    border-radius: 50%;
    background-clip: padding-box;
}

.pt-popup__label {
    margin: 0 0 9px;
    color: #71cf3a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.pt-popup__title {
    margin: 0;
    color: #171717;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.22;
}

.pt-popup__title br:last-child {
    display: none;
}

.pt-popup__button {
    min-width: 150px;
    margin-top: 30px;
    padding: 13px 28px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    background: #71cf3a;
    border: 1px solid #71cf3a;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(113, 207, 58, 0.24);
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pt-popup__button:hover {
    background: #5fba2e;
    border-color: #5fba2e;
    box-shadow: 0 12px 28px rgba(95, 186, 46, 0.30);
    transform: translateY(-1px);
}

/* Kolory systemowych komunikatów. */
.pt-popup--success .pt-popup__dialog,
.pt-popup--notice .pt-popup__dialog {
    border-top-color: #71cf3a;
}

.pt-popup--error .pt-popup__dialog {
    border-top-color: #d94949;
}

.pt-popup--error .pt-popup__icon,
.pt-popup--error .pt-popup__button {
    background-color: #d94949;
    border-color: #d94949;
}

.pt-popup--error .pt-popup__label {
    color: #d94949;
}

.pt-popup.pt-popup--error .pt-popup__close:hover,
.pt-popup.pt-popup--error .pt-popup__close:focus,
.pt-popup.pt-popup--error .pt-popup__close:active {
    color: #ffffff !important;
    background-color: #d94949 !important;
}

.pt-popup.pt-popup--error .pt-popup__close:focus-visible,
.pt-popup.pt-popup--error .pt-popup__button:focus-visible {
    outline: 3px solid rgba(217, 73, 73, 0.35) !important;
    outline-offset: 3px !important;
}

.pt-popup.pt-popup--error .pt-popup__dialog::before {
    background-color: rgba(217, 73, 73, 0.08) !important;
}

.pt-popup.pt-popup--error .pt-popup__button {
    box-shadow: 0 10px 24px rgba(217, 73, 73, 0.28) !important;
}

@media (max-width: 575px) {
    .pt-popup {
        align-items: flex-end;
        padding: 14px;
    }

    .pt-popup__dialog {
        width: 100%;
        padding: 40px 24px 28px;
        border-radius: 16px;
    }

    .pt-popup__icon {
        width: 62px;
        height: 62px;
        margin-bottom: 17px;
        font-size: 32px;
        border-width: 7px;
    }

    .pt-popup__title {
        font-size: 25px;
    }

    .pt-popup__button {
        width: 100%;
        margin-top: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pt-popup,
    .pt-popup__dialog,
    .pt-popup__close,
    .pt-popup__button {
        transition: none;
    }
}
