/* AlRawaabit Video Bubble - Frontend Styles */
/* ================================================ */

/* Wrapper */
.arbvb-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 90px;
    height: 90px;
    z-index: 999999;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--arbvb-border-color, #7432ff), #5a1fd4);
    transition: all 0.3s ease;
    overflow: visible;
    border: 3px solid var(--arbvb-border-color, #7432ff);
}

.arbvb-wrapper:hover {
    box-shadow: 0 6px 30px rgba(116, 50, 255, 0.4);
    transform: scale(1.05);
}

/* Bubble Icon */
.arbvb-bubble-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 28px;
    z-index: 2;
}
.arbvb-bubble-icon img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.arbvb-emoji-icon {
    font-size: 36px;
}

/* Video preview inside bubble */
.arbvb-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Greeting text */
.arbvb-text {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Close button */
.arbvb-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}
.arbvb-close:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Tooltip */
.arbvb-tooltip-text {
    position: absolute;
    right: 100%;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 12px;
    background: #333;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    z-index: 20;
    pointer-events: none;
}
.arbvb-tooltip-text::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #333;
}

/* Full area */
.arbvb-full-area {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 999998;
    overflow: hidden;
    visibility: hidden;
}

.arbvb-wrapper.arbvb-wrapper-full .arbvb-full-area {
    display: block;
    visibility: visible;
}

.arbvb-wrapper.arbvb-wrapper-full .arbvb-bubble-icon,
.arbvb-wrapper.arbvb-wrapper-full .arbvb-text,
.arbvb-wrapper.arbvb-wrapper-full .arbvb-close,
.arbvb-wrapper.arbvb-wrapper-full video {
    display: none !important;
}

.arbvb-wrapper.arbvb-wrapper-full {
    width: auto !important;
    height: auto !important;
    border-radius: 16px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.arbvb-wrapper.arbvb-wrapper-full:hover {
    transform: none;
    box-shadow: none;
}

/* Full close */
.arbvb-full-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    transition: background 0.2s;
}
.arbvb-full-close:hover {
    background: rgba(0,0,0,0.8);
}

/* Video container */
.arbvb-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}
.arbvb-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.arbvb-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Play overlay */
.arbvb-full-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(116, 50, 255, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    transition: all 0.2s;
}
.arbvb-full-play:hover {
    background: rgba(116, 50, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Media action controls */
.arbvb-media-action {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}
.arbvb-media-action > div {
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.arbvb-media-action > div:hover {
    background: rgba(0,0,0,0.8);
}

/* Action buttons */
.arbvb-change-video {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.95);
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}
.arbvb-video-btn {
    cursor: pointer;
}
.arbvb-change-video a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--arbvb-btn-bg, #7432ff);
    color: var(--arbvb-btn-color, #fff);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.arbvb-change-video a:hover {
    background: var(--arbvb-btn-hover-bg, #5a1fd4);
    color: var(--arbvb-btn-hover-color, #fff);
}
.arbvb-change-video a.icon_only {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

/* Button tooltips */
.arbvb-btn-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}
.arbvb-btn-tooltip-top { bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; }
.arbvb-btn-tooltip-bottom { top: 100%; left: 50%; transform: translateX(-50%); margin-top: 8px; }
.arbvb-btn-tooltip-left { right: 100%; top: 50%; transform: translateY(-50%); margin-right: 8px; }
.arbvb-btn-tooltip-right { left: 100%; top: 50%; transform: translateY(-50%); margin-left: 8px; }

/* Contact forms */
.arbvb-contact-form {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 20;
    padding: 20px;
    overflow-y: auto;
}
.arbvb-contact-form.arbvb-form-active {
    display: block;
}
.arbvb-contact-form h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}
.arbvb-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    z-index: 25;
}
.arbvb-form-close:hover {
    background: #ddd;
}
.arbvb-contact-form input,
.arbvb-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}
.arbvb-contact-form input:focus,
.arbvb-contact-form textarea:focus {
    outline: none;
    border-color: #7432ff;
}
.arbvb-form-submit {
    width: 100%;
    padding: 10px;
    background: #7432ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.arbvb-form-submit:hover {
    background: #5a1fd4;
}

/* Gallery navigation */
.arbvb-gallery-nav {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}
.arbvb-gallery-prev,
.arbvb-gallery-next {
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.arbvb-gallery-prev:hover,
.arbvb-gallery-next:hover {
    background: rgba(0,0,0,0.8);
}
.arbvb-gallery-counter {
    color: #fff;
    font-size: 12px;
    background: rgba(0,0,0,0.4);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Animations — FIXED: use visibility:hidden instead of opacity:0 so the
   bubble is visible by default even if JS fails or is blocked. */
.arbvb-wrapper.arbvb-anim-fade { visibility: hidden; opacity: 0; transition: opacity 0.5s ease, visibility 0s 0.5s; }
.arbvb-wrapper.arbvb-animation-active.arbvb-anim-fade { visibility: visible; opacity: 1; transition: opacity 0.5s ease, visibility 0s 0s; }

.arbvb-wrapper.arbvb-anim-slide { visibility: hidden; opacity: 0; transform: translateY(50px); transition: all 0.5s ease; }
.arbvb-wrapper.arbvb-anim-slide.arbvb-animation-active { visibility: visible; opacity: 1; transform: translateY(0); }

.arbvb-wrapper.arbvb-anim-bounce { visibility: hidden; opacity: 0; transform: translateY(50px); }
.arbvb-wrapper.arbvb-anim-bounce.arbvb-animation-active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    animation: arbvbBounce 0.6s ease;
}
@keyframes arbvbBounce {
    0% { transform: translateY(50px); opacity: 0; }
    60% { transform: translateY(-10px); opacity: 1; }
    80% { transform: translateY(5px); }
    100% { transform: translateY(0); }
}

.arbvb-wrapper.arbvb-anim-pulse { visibility: hidden; opacity: 0; }
.arbvb-wrapper.arbvb-anim-pulse.arbvb-animation-active {
    visibility: visible;
    opacity: 1;
    animation: arbvbPulse 1s ease infinite;
}
@keyframes arbvbPulse {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.arbvb-wrapper.arbvb-anim-zoom { visibility: hidden; opacity: 0; transform: scale(0); }
.arbvb-wrapper.arbvb-anim-zoom.arbvb-animation-active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
    animation: arbvbZoom 0.5s ease;
}
@keyframes arbvbZoom {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Scroll resize */
.arbvb-wrapper-resize {
    transform: scale(0.67) !important;
    transition: transform 0.3s ease;
}

/* Device visibility */
.arbvb-only-desktop { }
.arbvb-only-tablet { display: none !important; }
.arbvb-only-mobile { display: none !important; }

@media only screen and (min-width: 576px) and (max-width: 991px) {
    .arbvb-only-everywhere { }
    .arbvb-only-desktop { display: none !important; }
    .arbvb-only-tablet { display: flex !important; }
    .arbvb-only-mobile { display: none !important; }
}
@media only screen and (max-width: 576px) {
    .arbvb-only-everywhere { }
    .arbvb-only-desktop { display: none !important; }
    .arbvb-only-tablet { display: none !important; }
    .arbvb-only-mobile { display: flex !important; }
    .arbvb-full-area { width: calc(100vw - 20px) !important; height: 220px !important; right: 10px !important; bottom: 10px !important; }
}

/* Scrollbar styling */
.arbvb-contact-form::-webkit-scrollbar { width: 6px; }
.arbvb-contact-form::-webkit-scrollbar-track { background: var(--arbvb-track-bg, #eee); border-radius: 3px; }
.arbvb-contact-form::-webkit-scrollbar-thumb { background: var(--arbvb-thumb-bg, #7432ff); border-radius: 3px; }
