/* GBook Audio Call Styles */
.gbook-call-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.gbook-call-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.gbook-call-modal-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 24px;
    padding: 36px 28px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    font-family: 'Tiro Bangla', sans-serif;
}
.gbook-call-modal-overlay.active .gbook-call-modal-card {
    transform: scale(1);
}
.gbook-call-avatar-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px auto;
    position: relative;
}
.gbook-call-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}
.gbook-call-pulse-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.5);
    animation: gbookCallPulse 1.8s infinite ease-in-out;
}
@keyframes gbookCallPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.3; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.gbook-call-user-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #ffffff;
}
.gbook-call-status-txt {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.gbook-call-timer {
    font-size: 18px;
    font-weight: 700;
    color: #38bdf8;
    font-family: monospace;
}

.gbook-call-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}
.gbook-call-btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.gbook-call-btn-circle:hover {
    transform: scale(1.1);
}
.gbook-call-btn-accept {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.gbook-call-btn-reject, .gbook-call-btn-end {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.gbook-call-btn-retry {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.gbook-call-btn-mute, .gbook-call-btn-speaker {
    background: #334155;
    color: #cbd5e1;
}
.gbook-call-btn-mute.muted {
    background: #eab308;
    color: #000000;
}
.gbook-call-btn-speaker.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.gbook-call-tip-box {
    margin: 16px 0 20px 0;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.gbook-call-tip-box i {
    color: #ef4444;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.gbook-call-btn-close-top {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 25;
}
.gbook-call-btn-close-top:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ===================================================
   GBook Modern Video Call Styles (HD Dual View & PiP)
   =================================================== */
.gbook-call-modal-overlay.video-mode {
    padding: 0 !important;
    background: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
    user-select: none;
    -webkit-user-select: none;
}

/* WebKit / Android WebView native video player placeholder and controls suppression */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
}

/* রিমোট (অপর প্রান্তের) ফুলস্ক্রিন ভিডিও */
.gbook-video-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 60%, #020617 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
}

#gbookRemoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

/* লোকাল (নিজের সেলফি) পিকচার-ইন-পিকচার ভিউ */
.gbook-local-video-pip {
    position: absolute;
    top: 24px;
    right: 20px;
    width: 115px;
    height: 165px;
    border-radius: 18px;
    overflow: hidden;
    z-index: 30;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.45);
    background: #1e293b;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 768px) {
    .gbook-local-video-pip {
        width: 165px;
        height: 230px;
        top: 32px;
        right: 32px;
    }
}

.gbook-local-video-pip:active {
    transform: scale(0.96);
}

#gbookLocalVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* মিরর সেলফি ভিউ */
}

/* ভিডিও মোডে হেডার বার */
.gbook-video-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 50px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.gbook-video-header-overlay .gbook-call-user-name {
    font-size: 22px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.gbook-video-header-overlay .gbook-call-status-txt {
    font-size: 13px;
    color: #e2e8f0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    margin: 4px 0 0 0;
}

.gbook-video-header-overlay .gbook-call-timer {
    font-size: 15px;
    color: #38bdf8;
    background: rgba(15, 23, 42, 0.75);
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 6px;
    border: 1px solid rgba(255,255,255,0.12);
}

/* ভিডিও প্রি-কানেক্ট / ডায়ালিং স্টেট (কল রিসিভ করার আগ পর্যন্ত আকর্ষণীয় কার্ড ইন্টারফেস) */
.gbook-call-modal-overlay.video-mode.video-connecting {
    background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 60%, #020617 100%) !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-modal-card {
    position: absolute !important;
    top: 52% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    inset: auto !important;
    width: 88% !important;
    max-width: 360px !important;
    height: auto !important;
    max-height: 85vh !important;
    background: rgba(15, 23, 42, 0.82) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65) !important;
    padding: 30px 20px 24px !important;
    margin: 0 !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    z-index: 35 !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting #gbookBtnModalClose {
    display: flex !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-avatar-wrap {
    display: block !important;
    margin-bottom: 18px !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-user-name {
    display: block !important;
    font-size: 22px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-status-txt {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: #94a3b8 !important;
    margin-bottom: 24px !important;
}

.gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-actions-row {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 480px) {
    .gbook-call-modal-overlay.video-mode.video-connecting .gbook-call-modal-card {
        width: 86% !important;
        max-width: 340px !important;
        top: 52% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 26px 16px 22px !important;
    }

    .gbook-call-modal-overlay.video-mode.video-connecting .gbook-local-video-pip {
        width: 90px !important;
        height: 125px !important;
        top: 16px !important;
        right: 16px !important;
        border-radius: 14px !important;
        z-index: 40 !important;
    }
}

/* ভিডিও মোডে কার্ডকে ট্রান্সপারেন্ট ওভারলে হিসেবে রূপান্তর */
.gbook-call-modal-overlay.video-mode .gbook-call-modal-card {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 35 !important;
    pointer-events: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.gbook-call-modal-overlay.video-mode #gbookBtnModalClose {
    display: none !important;
}

/* ভিডিও মোডে কন্ট্রোল বার (ফ্লোটিং গ্লাস ক্যাপসুল) */
.gbook-call-modal-overlay.video-mode .gbook-call-actions-row {
    position: absolute !important;
    bottom: 32px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    padding: 14px 28px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 60px !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65) !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (max-width: 480px) {
    .gbook-call-modal-overlay.video-mode .gbook-call-actions-row {
        bottom: 24px !important;
        gap: 12px !important;
        padding: 10px 18px !important;
        width: auto !important;
        max-width: 94vw !important;
    }
}

/* ভিডিও মোডে বাটন স্টাইল */
.gbook-call-modal-overlay.video-mode .gbook-call-btn-circle {
    width: 54px !important;
    height: 54px !important;
    font-size: 20px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (min-width: 768px) {
    .gbook-call-modal-overlay.video-mode .gbook-call-btn-circle {
        width: 60px !important;
        height: 60px !important;
        font-size: 22px !important;
    }
}

/* লাল রঙের কল কাটার বাটন */
.gbook-call-modal-overlay.video-mode .gbook-call-btn-end {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
    width: 60px !important;
    height: 60px !important;
    font-size: 24px !important;
}

.gbook-call-modal-overlay.video-mode .gbook-call-btn-end:hover {
    transform: scale(1.1) !important;
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.8) !important;
}

/* ক্যামেরা, ফ্লিপ ও মাইক বাটন */
.gbook-call-modal-overlay.video-mode .gbook-call-btn-cam,
.gbook-call-modal-overlay.video-mode .gbook-call-btn-flip,
.gbook-call-modal-overlay.video-mode .gbook-call-btn-mute {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.gbook-call-modal-overlay.video-mode .gbook-call-btn-cam:hover,
.gbook-call-modal-overlay.video-mode .gbook-call-btn-flip:hover,
.gbook-call-modal-overlay.video-mode .gbook-call-btn-mute:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.08) !important;
}

/* মাইক মিউট স্টেট */
.gbook-call-modal-overlay.video-mode .gbook-call-btn-mute.muted {
    background: #eab308 !important;
    color: #0f172a !important;
    border-color: #eab308 !important;
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.6) !important;
}

/* ক্যামেরা অফ স্টেট */
.gbook-call-modal-overlay.video-mode .gbook-call-btn-cam.off {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6) !important;
}

/* স্ক্রিন ট্যাপ / অটো-হাইড এফেক্ট (কথা বলার সময় কন্ট্রোল বার হাইড থাকা) */
.gbook-call-modal-overlay.video-mode.controls-hidden .gbook-video-header-overlay {
    opacity: 0 !important;
    transform: translateY(-30px) !important;
    pointer-events: none !important;
}

.gbook-call-modal-overlay.video-mode.controls-hidden .gbook-call-actions-row {
    opacity: 0 !important;
    transform: translate(-50%, 70px) !important;
    pointer-events: none !important;
}

