/**
 * LeadRadar Forms — Popup „Zadzwoń teraz"
 * Version: 2.8.0
 *
 * Osobny, samodzielny popup (odwzorowanie designu Fair Forms, tryb „Zadzwońcie teraz").
 * UWAGA: zgodnie z pułapką projektu NIE używamy !important na właściwościach animowanych
 * (opacity/transform w przejściach open/close) — inaczej kaskada blokuje animacje.
 */

.leadradar-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.leadradar-popup-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.leadradar-popup-overlay * { box-sizing: border-box; }

.leadradar-popup {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    padding: 40px 44px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(12px);
    transition: transform 0.25s ease;
}
.leadradar-popup-overlay.is-open .leadradar-popup { transform: translateY(0); }

.leadradar-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: #9aa0a6;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease;
}
.leadradar-popup-close:hover { color: #5f6368; }

.leadradar-popup-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 4px 0 26px;
    text-align: center;
}
.leadradar-popup-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(75, 183, 103, 0.12);
    color: #4bb767;
}
.leadradar-popup-ico svg { width: 28px; height: 28px; display: block; }

.leadradar-popup-title {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    color: #3c4043;
    margin: 0;
    text-wrap: balance;
}

.leadradar-popup-row {
    display: flex;
    gap: 14px;
    align-items: stretch;
}
.leadradar-popup-phone {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid #d6d9de;
    border-radius: 8px;
    font-size: 16px;
    color: #3c4043;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.leadradar-popup-phone:focus {
    outline: none;
    border-color: #4bb767;
    box-shadow: 0 0 0 3px rgba(75, 183, 103, 0.2);
}
.leadradar-popup-phone.has-error {
    border-color: #e0554e;
    box-shadow: 0 0 0 3px rgba(224, 85, 78, 0.15);
}

.leadradar-popup-submit {
    flex: 0 0 auto;
    min-width: 200px;
    background: #6cc283;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    padding: 14px 22px;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.2s ease, opacity 0.2s ease;
}
.leadradar-popup-submit:hover { background: #4bb767; }
.leadradar-popup-submit:disabled { opacity: 0.65; cursor: default; }

.leadradar-popup-error {
    color: #c0392b;
    font-size: 14px;
    line-height: 1.4;
    margin: 12px 2px 0;
}

.leadradar-popup-consent {
    text-align: center;
    color: #9aa0a6;
    font-size: 13px;
    line-height: 1.5;
    margin: 20px auto 0;
    max-width: 460px;
}
.leadradar-popup-consent a { color: #4bb767; text-decoration: none; }
.leadradar-popup-consent a:hover { text-decoration: underline; }

/* ---- Stan sukcesu (po wysłaniu) ---- */
.leadradar-popup-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 6px;
}
.leadradar-popup-check {
    display: inline-flex;
    margin-bottom: 16px;
}
.leadradar-popup-check svg { width: 68px; height: 68px; }
.leadradar-popup-check circle {
    stroke: #4bb767;
    stroke-width: 2;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: lr-popup-circle 0.5s ease forwards;
}
.leadradar-popup-check path {
    stroke: #4bb767;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: lr-popup-check 0.35s 0.45s ease forwards;
}
@keyframes lr-popup-circle { to { stroke-dashoffset: 0; } }
@keyframes lr-popup-check  { to { stroke-dashoffset: 0; } }

.leadradar-popup-success-msg {
    font-size: 19px;
    font-weight: 700;
    color: #3c4043;
    margin: 0;
    line-height: 1.4;
}

/* ---- Mobile ---- */
@media (max-width: 560px) {
    .leadradar-popup { max-width: 100%; padding: 40px 22px 28px; }
    .leadradar-popup-title { font-size: 24px; }
    .leadradar-popup-row { flex-direction: column; }
    .leadradar-popup-submit { min-width: 0; width: 100%; }
}
