/* Basic popup + floating widget styles – Version 1.0.1 skeleton */

#wdpf-next-popup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    z-index: 99999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#wdpf-next-popup-overlay.wdpf-next-hidden {
    display: none;
}

.wdpf-next-popup {
    background: #ffffff;
    max-width: 720px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.28);
    padding: 24px 28px 24px;
    position: relative;
}

.wdpf-next-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.wdpf-next-popup-header {
    margin-bottom: 16px;
}

.wdpf-next-popup-title {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.wdpf-next-popup-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.wdpf-next-popup-body {
    margin-top: 8px;
}

.wdpf-next-step {
    display: none;
}

.wdpf-next-step-active {
    display: block;
}

.wdpf-next-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin-top: 12px;
    margin-bottom: 16px;
}

.wdpf-next-field-grid label span,
.wdpf-next-step label span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 3px;
}

.wdpf-next-field-grid input,
.wdpf-next-step input,
.wdpf-next-step textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    outline: none;
}

.wdpf-next-field-grid input:focus,
.wdpf-next-step input:focus,
.wdpf-next-step textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.wdpf-next-step textarea {
    resize: vertical;
}

.wdpf-next-actions {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.wdpf-next-btn {
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    background: #f8fafc;
    color: #0f172a;
}

.wdpf-next-btn.wdpf-next-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.wdpf-next-summary-placeholder {
    font-size: 13px;
    color: #475569;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5f5;
    margin-top: 8px;
}

.wdpf-next-trigger-btn {
    border-radius: 999px;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
}

/* Floating WhatsApp-style bubble */
#wdpf-next-floating-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    color: #ffffff;
    font-weight: 600;
    font-size: 11px;
    text-align: center;
    padding: 4px;
    animation: wdpf-next-pulse 2.4s infinite;
}

#wdpf-next-floating-widget.wdpf-next-hidden {
    display: none;
}

@keyframes wdpf-next-pulse {
    0% {
        transform: translateY(0);
        box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
    }
    50% {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(22, 163, 74, 0.55);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
    }
}

@media (max-width: 640px) {
    .wdpf-next-popup {
        max-width: 100%;
        margin: 12px;
        padding: 18px 16px 18px;
    }
    .wdpf-next-field-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
