/* ========================================
   LUXURY WHATSAPP CHAT POPUP
   Premium Design with High-End Aesthetics
======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === MAIN WRAPPER === */
.wcp-wrapper {
    position: fixed;
    bottom: 30px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wcp-right {
    right: 30px;
}

.wcp-left {
    left: 30px;
}

/* === LUXURY POPUP BOX === */
.wcp-popup {
    position: absolute;
    bottom: 95px;
    right: -20px;
    width: 420px;
    max-width: calc(100vw - 60px);
    background: #FFFFFF;
    border-radius: 28px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px) scale(0.92);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.wcp-left .wcp-popup {
    right: auto;
    left: -20px;
}

.wcp-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* === PREMIUM GRADIENT HEADER === */
.wcp-header {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 50%, #34E07B 100%);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Luxury shimmer effect */
.wcp-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Subtle dot pattern */
.wcp-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.wcp-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.wcp-logo {
    width: 48px;
    height: 48px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    filter: brightness(0) invert(1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(2deg); }
}

.wcp-header-content span {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wcp-close {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.wcp-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wcp-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* === LUXURY BODY WITH ELEGANT PATTERN === */
.wcp-body {
    padding: 50px 32px;
    background: 
        linear-gradient(135deg, #FAFCFB 0%, #F8FAF9 50%, #FFFFFF 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Premium mesh gradient overlay */
.wcp-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(37, 211, 102, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(18, 140, 126, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* Elegant line pattern */
.wcp-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 4px,
            rgba(37, 211, 102, 0.02) 4px,
            rgba(37, 211, 102, 0.02) 8px
        );
    pointer-events: none;
    opacity: 0.6;
}

.wcp-greeting {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.wcp-message {
    font-size: 18px;
    font-weight: 500;
    color: #5A6C7D;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    letter-spacing: -0.2px;
}

/* === LUXURY FOOTER === */
.wcp-footer {
    padding: 32px 32px 36px;
    text-align: center;
    background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* === PREMIUM BUTTON === */
.wcp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #128C7E 0%, #25D366 50%, #2EE472 100%);
    color: #FFFFFF;
    padding: 18px 44px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(37, 211, 102, 0.3),
        0 4px 12px rgba(37, 211, 102, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Luxury shine effect */
.wcp-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%);
    transition: transform 0.6s;
}

.wcp-button:hover::before {
    transform: translateX(100%) translateY(100%);
}

.wcp-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 60px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.wcp-button:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 40px rgba(37, 211, 102, 0.4),
        0 8px 20px rgba(37, 211, 102, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.wcp-button:hover::after {
    opacity: 1;
}

.wcp-button:active {
    transform: translateY(-2px);
}

.wcp-button svg {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wcp-button:hover svg {
    transform: translateX(6px);
}

/* === LUXURY FLOATING BUTTON === */
.wcp-float-btn {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #128C7E 0%, #25D366 50%, #2EE472 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 12px 35px rgba(37, 211, 102, 0.4),
        0 6px 18px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: floatIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes floatIn {
    from {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Luxury glow ring */
.wcp-float-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #2EE472);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
    filter: blur(16px);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Rotating border */
.wcp-float-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.wcp-float-btn:hover::before {
    opacity: 0.9;
}

.wcp-float-btn:hover::after {
    opacity: 1;
}

.wcp-float-btn:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 
        0 20px 50px rgba(37, 211, 102, 0.5),
        0 10px 25px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.wcp-float-btn:active {
    transform: translateY(-6px) scale(1.05);
}

.wcp-float-btn img {
    width: 44px;
    height: 44px;
    filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wcp-float-btn:hover img {
    transform: scale(1.15) rotate(8deg);
}

.wcp-float-btn.hide {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.2) rotate(180deg);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 480px) {
    .wcp-wrapper {
        bottom: 20px;
        right: 20px !important;
        left: auto !important;
    }

    .wcp-popup {
        width: calc(100vw - 40px);
        bottom: 90px;
        right: -10px !important;
        left: auto !important;
        border-radius: 24px;
    }

    .wcp-left .wcp-popup {
        right: -10px !important;
        left: auto !important;
    }

    .wcp-float-btn {
        width: 65px;
        height: 65px;
    }

    .wcp-float-btn img {
        width: 40px;
        height: 40px;
    }

    .wcp-header {
        padding: 20px 24px;
    }

    .wcp-logo {
        width: 44px;
        height: 44px;
        padding: 9px;
    }

    .wcp-header-content span {
        font-size: 18px;
    }

    .wcp-close {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .wcp-body {
        padding: 42px 26px;
    }

    .wcp-greeting {
        font-size: 24px;
    }

    .wcp-message {
        font-size: 16px;
    }

    .wcp-footer {
        padding: 28px 26px 32px;
    }

    .wcp-button {
        padding: 16px 38px;
        font-size: 16px;
        max-width: 100%;
    }
}

/* === SMALL MOBILE === */
@media (max-width: 360px) {
    .wcp-popup {
        width: calc(100vw - 30px);
        right: -8px !important;
    }

    .wcp-float-btn {
        width: 60px;
        height: 60px;
    }

    .wcp-float-btn img {
        width: 38px;
        height: 38px;
    }

    .wcp-greeting {
        font-size: 22px;
    }

    .wcp-message {
        font-size: 15px;
    }

    .wcp-button {
        padding: 15px 34px;
        font-size: 15px;
    }
}

/* === TABLET === */
@media (min-width: 481px) and (max-width: 768px) {
    .wcp-popup {
        width: 400px;
    }
}

/* === LANDSCAPE === */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
    .wcp-popup {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .wcp-body {
        padding: 35px 26px;
    }
}

/* === SMOOTH SCROLLBAR === */
.wcp-popup::-webkit-scrollbar {
    width: 6px;
}

.wcp-popup::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.wcp-popup::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #128C7E, #25D366);
    border-radius: 3px;
}

.wcp-popup::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0E7A6C, #1FBE5B);
}
