/* Khabar Devbhoomi WhatsApp Join Popup Styling */

.kd-wa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.kd-wa-modal-overlay.kd-wa-show {
    opacity: 1;
    visibility: visible;
}

.kd-wa-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 18, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.kd-wa-modal-card {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 32px 24px 22px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(37, 211, 102, 0.15);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    overflow: hidden;
}

.kd-wa-modal-overlay.kd-wa-show .kd-wa-modal-card {
    transform: scale(1) translateY(0);
}

/* Close Button */
.kd-wa-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #f1f3f4;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.kd-wa-close-btn:hover {
    background: #e4e7ea;
    color: #202124;
    transform: rotate(90deg);
}

/* WhatsApp Icon & Pulse Animation */
.kd-wa-icon-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kd-wa-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: kdWaPulse 2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

@keyframes kdWaPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.kd-wa-icon-bubble {
    position: relative;
    width: 66px;
    height: 66px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Badge */
.kd-wa-badge {
    display: inline-block;
    background: #e8f9ee;
    color: #075E54;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Typography */
.kd-wa-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.kd-wa-desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

/* Actions */
.kd-wa-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.kd-wa-btn-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, #25D366 0%, #1EBE5D 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transition: all 0.25s ease;
    cursor: pointer;
}

.kd-wa-btn-join:hover {
    background: linear-gradient(180deg, #1EBE5D 0%, #169E4B 100%);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.kd-wa-btn-later {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.kd-wa-btn-later:hover {
    color: #111827;
    text-decoration: underline;
}

/* Footer note */
.kd-wa-footer-note {
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.2px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .kd-wa-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .kd-wa-modal-card {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 28px 20px 24px;
        transform: translateY(100%);
    }

    .kd-wa-modal-overlay.kd-wa-show .kd-wa-modal-card {
        transform: translateY(0);
    }

    .kd-wa-title {
        font-size: 18px;
    }

    .kd-wa-desc {
        font-size: 13.5px;
        margin-bottom: 16px;
    }

    .kd-wa-btn-join {
        padding: 13px 18px;
        font-size: 15.5px;
    }
}
