/* ═══════════════════════════════════════════
   Lead Capture Popup — Modal Styles
   ═══════════════════════════════════════════ */

.plw-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.plw-popup-overlay.plw-popup-visible {
    display: flex;
    opacity: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Card ── */
.plw-popup-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 44px 36px 36px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.plw-popup-overlay.plw-popup-visible .plw-popup-card {
    transform: translateY(0) scale(1);
}

/* ── Close Button ── */
.plw-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.plw-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* ── Icon ── */
.plw-popup-icon {
    font-size: 44px;
    margin-bottom: 12px;
    line-height: 1;
}

/* ── Heading ── */
.plw-popup-heading {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    line-height: 1.3;
}

/* ── Description ── */
.plw-popup-description {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #666;
    margin: 0 0 28px;
    line-height: 1.55;
}

/* ── Form ── */
.plw-popup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.plw-popup-form input[type="text"],
.plw-popup-form input[type="email"],
.plw-popup-form input[type="tel"] {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #f8f8f9;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    transition: all 0.25s ease;
    box-sizing: border-box;
    outline: none;
    margin: 0;
}

.plw-popup-form input[type="text"]:focus,
.plw-popup-form input[type="email"]:focus,
.plw-popup-form input[type="tel"]:focus {
    border-color: #48A9A6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(72, 169, 166, 0.15);
}

.plw-popup-form input::placeholder {
    color: #aaa;
}

/* ── Opt-in ── */
.plw-popup-optin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    user-select: none;
    margin-top: 2px;
}

.plw-popup-optin input[type="checkbox"] {
    display: none;
}

.plw-popup-optin-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.plw-popup-optin:hover .plw-popup-optin-check {
    border-color: #48A9A6;
}

.plw-popup-optin input:checked + .plw-popup-optin-check {
    background: linear-gradient(135deg, #48A9A6 0%, #3d918e 100%);
    border-color: transparent;
}

.plw-popup-optin input:checked + .plw-popup-optin-check::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.plw-popup-optin-text {
    font-size: 13px;
    line-height: 1.4;
    color: #777;
}

/* ── Submit Button ── */
.plw-popup-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #48A9A6 0%, #3d918e 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.plw-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 169, 166, 0.4);
    filter: brightness(1.06);
}

.plw-popup-submit:active {
    transform: translateY(0);
}

.plw-popup-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.plw-popup-submit-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.plw-popup-submit:hover .plw-popup-submit-arrow {
    transform: translateX(4px);
}

/* ── Spinner inside submit ── */
.plw-popup-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: plw-popup-spin 0.7s linear infinite;
}

@keyframes plw-popup-spin {
    to { transform: rotate(360deg); }
}

.plw-popup-submit.plw-popup-loading .plw-popup-submit-label,
.plw-popup-submit.plw-popup-loading .plw-popup-submit-arrow {
    display: none;
}

.plw-popup-submit.plw-popup-loading .plw-popup-spinner {
    display: block;
}

/* ── Phone CTA ── */
.plw-popup-phone {
    margin-top: 32px;
    font-size: 18px;
    color: #555;
}

.plw-popup-phone a {
    color: #48A9A6;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.plw-popup-phone a:hover {
    color: #3d918e;
    text-decoration: underline;
}

/* ── Success State ── */
.plw-popup-success {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.plw-popup-success-icon {
    font-size: 54px;
    margin-bottom: 16px;
    line-height: 1;
}

.plw-popup-success-heading {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.plw-popup-success-text {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ── Feedback ── */
.plw-popup-feedback {
    display: none;
    font-size: 14px;
    color: #c00;
    margin-top: 8px;
    text-align: center;
}

/* ── Legal ── */
.plw-popup-legal {
    font-size: 11px;
    line-height: 1.5;
    color: #aaa;
    margin-top: 14px;
}

.plw-popup-legal a {
    color: #48A9A6;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 500px) {
    .plw-popup-card {
        padding: 36px 24px 28px;
        border-radius: 18px;
    }

    .plw-popup-heading {
        font-size: 20px;
    }

    .plw-popup-description {
        font-size: 14px;
    }
}
