﻿
/* 🔥 Ultra-Premium WhatsApp CSS 🔥 */
.wa-premium-menu {
    position: absolute;
    bottom: 70px; /* TextBox ke theek upar set karein */
    left: 20px;
    background: rgba(255, 255, 255, 0.98); /* Bright Premium White */
    backdrop-filter: blur(8px); /* Apple/WhatsApp Jaisa Blur Effect */
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 24px 20px 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 320px;
    animation: waBouncyPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom left;
    border: 1px solid rgba(0,0,0,0.05);
}

.wa-attach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 15px;
}

.wa-attach-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .wa-attach-item:hover {
        transform: translateY(-4px) scale(1.05);
    }

    .wa-attach-item:active {
        transform: scale(0.95);
    }

.wa-icon-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wa-attach-item span {
    font-size: 13px;
    color: #54656f;
    font-weight: 500;
    font-family: 'Segoe UI', Helvetica, sans-serif;
}

/* 🔥 Premium Gradient Colors For Icons 🔥 */
.bg-doc {
    background: linear-gradient(135deg, #7F66FF, #5A35FF);
}

.bg-camera {
    background: linear-gradient(135deg, #FF455E, #D81A35);
}

.bg-gallery {
    background: linear-gradient(135deg, #C250D6, #A12BBA);
}

.bg-audio {
    background: linear-gradient(135deg, #F97C2B, #E45500);
}

.bg-location {
    background: linear-gradient(135deg, #10B981, #059669);
}
.bg-contact {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
}


/* Pop Animation */
@@keyframes waBouncyPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==========================================
   🎨 WHATSAPP PRO MEDIA & PDF VIEWER STYLES (attachment-media.css)
   ========================================== */

/* 1. Clean Frameless Media Container in Chat */
.chat-image-container.wa-clean-media-frame,
.msg-row .chat-image-container {
    position: relative !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    width: 240px !important;
    max-width: 240px !important;
    max-height: 240px !important;
}

    .msg-row .chat-image-container .download-overlay:not([style*="display: none"]):not([style*="display:none"]) {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 4 !important;
        cursor: pointer !important;
    }

/* 2. Uniform 240x240 Square Size for Chat Images & Videos */
.msg-row img[src*="/uploads/"]:not(.rounded-circle),
.wa-media-thumb {
    width: 240px !important;
    height: 240px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    display: block !important;
    background: #0b141a;
    cursor: pointer;
    transition: filter 0.25s ease, transform 0.25s ease;
}

/* 3. Blurred Preview Layer for Undownloaded Receiver Images & Videos */
.wa-locked-blur-media {
    filter: blur(12px) brightness(0.68) !important;
    transform: scale(1.08);
}

.wa-vid-lock-overlay,
.wa-img-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 26, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
}

.wa-dl-circle-btn {
    min-width: 54px;
    height: 54px;
    padding: 0 14px;
    border-radius: 30px;
    background: rgba(17, 27, 33, 0.78);
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, background 0.15s ease;
}

.wa-vid-lock-overlay:hover .wa-dl-circle-btn,
.wa-img-lock-overlay:hover .wa-dl-circle-btn {
    transform: scale(1.06);
    background: rgba(0, 168, 132, 0.9);
}

/* 4. Full-Card Clickable Document Card (PDF, Word, Excel, ZIP) */
.wa-full-clickable-doc {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    width: 245px;
    max-width: 100%;
    cursor: pointer !important;
    user-select: none;
    border: 1px solid rgba(0,0,0,0.06);
    transition: background 0.15s ease, transform 0.1s ease;
}

    .wa-full-clickable-doc * {
        cursor: pointer !important;
        pointer-events: none;
    }

    .wa-full-clickable-doc:hover {
        background: rgba(0, 0, 0, 0.08);
    }

    .wa-full-clickable-doc:active {
        transform: scale(0.98);
    }

body.dark-mode .wa-full-clickable-doc,
[data-bs-theme="dark"] .wa-full-clickable-doc,
.bubble .wa-full-clickable-doc {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
}

.wa-doc-icon-circle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.wa-doc-info-col {
    flex: 1;
    overflow: hidden;
    text-align: left;
}

.wa-doc-filename {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-doc-sublabel {
    font-size: 11.5px;
    opacity: 0.75;
    margin-top: 2px;
    font-weight: 500;
}

/* 5. Interactive Video Thumbnail Card inside Chat Bubble */
.wa-video-thumb-card {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #0b141a;
}

.wa-video-play-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(17, 27, 33, 0.68);
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 29px;
    padding-left: 3px;
    backdrop-filter: blur(6px);
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    transition: transform 0.18s ease, background 0.18s ease;
}

.wa-video-thumb-card:hover .wa-video-play-circle {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(0, 168, 132, 0.9);
    border-color: #fff;
}

.wa-video-bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
    pointer-events: none;
    z-index: 6;
}

.wa-video-bottom-badge {
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* 6. Full-Screen WhatsApp Video (#video), Image (#image) & PDF (#pdf) Modals */
#wa-fullscreen-video-modal,
#wa-fullscreen-image-modal,
#wa-fullscreen-pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 20, 26, 0.96);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    user-select: none;
}
    #wa-fullscreen-video-modal[style*="display: none"],
    #wa-fullscreen-video-modal[style*="display:none"],
    #wa-fullscreen-image-modal[style*="display: none"],
    #wa-fullscreen-image-modal[style*="display:none"],
    #wa-fullscreen-pdf-modal[style*="display: none"],
    #wa-fullscreen-pdf-modal[style*="display:none"] {
        display: none !important;
    }
.wa-vid-modal-header {
    height: 60px;
    background: #111b21;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    padding: 0 18px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.wa-vid-icon-btn {
    background: transparent;
    border: none;
    color: #aebac1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

    .wa-vid-icon-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

.wa-vid-header-info {
    margin-left: 12px;
    overflow: hidden;
}

.wa-vid-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 74px 20px 20px 20px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

#wa-vid-stage {
    padding-bottom: 84px;
}

#wa-fullscreen-video-el,
#wa-fullscreen-image-el {
    max-width: min(92vw, 1100px) !important;
    max-height: calc(100vh - 104px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    outline: none;
    transition: transform 0.2s ease;
}

#wa-fullscreen-video-el {
    max-height: calc(100vh - 165px) !important;
}

#wa-fullscreen-image-el.wa-img-zoomed {
    transform: scale(1.85);
    cursor: zoom-out;
}

/* 🔥 EXACT WHATSAPP WEB PDF VIEWER DESIGN (Dark Stage + White Pages + Bottom Floating Page/Zoom Pill) 🔥 */
#wa-pdf-stage {
    padding: 60px 0 0 0 !important;
    background: #0b141a;
    overflow-y: auto !important;
    overflow-x: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    cursor: default;
}

#wa-pdf-pages-container {
    padding: 28px 16px 90px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
}

.wa-pdf-page-canvas {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
    border-radius: 2px;
    max-width: 95vw;
    transition: width 0.15s ease;
}

/* WhatsApp Bottom Floating Page & Zoom Pill */
.wa-pdf-floating-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 44, 51, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #e9edef;
    font-size: 13px;
    font-weight: 500;
    z-index: 30;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.wa-pdf-zoom-btn {
    background: transparent;
    border: none;
    color: #e9edef;
    font-size: 16px;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

    .wa-pdf-zoom-btn:hover {
        background: rgba(255, 255, 255, 0.12);
    }

.wa-pdf-pill-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.wa-center-play-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(17, 27, 33, 0.68);
    border: 2px solid rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    transition: opacity 0.25s ease, transform 0.2s ease;
    pointer-events: none;
}

.wa-controls-hidden {
    opacity: 0 !important;
}

/* 7. Bottom Glassmorphism Video Controls Bar */
.wa-vid-modal-footer {
    padding: 12px 16px 22px 16px;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.wa-vid-controls-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 620px;
    background: rgba(17, 27, 33, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 40px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}

.wa-vid-ctrl-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 23px;
    padding: 2px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.wa-vid-time-lbl {
    color: #e9edef;
    font-size: 12.5px;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}

.wa-vid-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: rgba(255,255,255,0.28);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

    .wa-vid-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #00a884;
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }

.wa-vid-speed-pill {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .wa-vid-speed-pill:hover {
        background: #00a884;
        border-color: #00a884;
    }

/* 8. Upload Progress Pill */
.wa-progress-pill {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(17, 27, 33, 0.85);
    color: #fff;
    padding: 6px 14px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    backdrop-filter: blur(4px);
}
/* 🔥 Hide Native Browser/WebView Default Ugly Play Icon on Video Load 🔥 */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}