/* VN Contact Button - Frontend Widget Styles */

:root {
    --vncb-widget-primary: #4F46E5;
    --vncb-widget-hover: #4338CA;
}

/* Widget Container */
.vncb-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vncb-widget.position-bottom-right {
    bottom: 24px;
    right: 24px;
}

.vncb-widget.position-bottom-left {
    bottom: 24px;
    left: 24px;
}

.vncb-widget.position-top-right {
    top: 24px;
    right: 24px;
}

.vncb-widget.position-top-left {
    top: 24px;
    left: 24px;
}

/* Main Button */
.vncb-main-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 56px;
    height: 56px;
    padding: 0 20px;
    background: var(--vncb-widget-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 500;
}

.vncb-main-btn:hover {
    background: var(--vncb-widget-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.vncb-main-btn:active {
    transform: translateY(0);
}

.vncb-main-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Size Variations */
.vncb-widget.size-small .vncb-main-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.vncb-widget.size-large .vncb-main-btn {
    width: 64px;
    height: 64px;
    min-width: 64px;
}

/* Style Variations */
.vncb-widget.style-square .vncb-main-btn {
    border-radius: 12px;
}

.vncb-widget.style-circle .vncb-main-btn {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    padding: 0;
}

/* Badge */
.vncb-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #EF4444;
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Channel Menu */
.vncb-channels {
    position: absolute;
    bottom: 70px;
    right: 0;
    /* min-width: 200px; */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vncb-widget.position-bottom-left .vncb-channels {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

.vncb-widget.position-top-right .vncb-channels {
    bottom: auto;
    top: 70px;
    transform-origin: top right;
}

.vncb-widget.position-top-left .vncb-channels {
    bottom: auto;
    top: 70px;
    right: auto;
    left: 0;
    transform-origin: top left;
}

.vncb-widget.open .vncb-channels {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Channel Header */
.vncb-channels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.vncb-channels-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.vncb-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6B7280;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vncb-close-btn:hover {
    background: #F3F4F6;
    color: #111827;
}

.vncb-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Channel List */
.vncb-channels-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.vncb-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.vncb-channel:hover {
    background: #F3F4F6;
    /* transform: translateX(4px); */
}

.vncb-channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.vncb-channel-icon svg {
    width: 20px;
    height: 20px;
}

.vncb-channel-info {
    flex: 1;
}

.vncb-channel-label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
    white-space: nowrap;
}

.vncb-channel-desc {
    font-size: 12px;
    color: #6B7280;
    margin: 2px 0 0;
}

/* Animations */
@keyframes vncb-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes vncb-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes vncb-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

.vncb-widget.animation-pulse .vncb-main-btn {
    animation: vncb-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.vncb-widget.animation-bounce .vncb-main-btn {
    animation: vncb-bounce 1s infinite;
}

.vncb-widget.animation-shake .vncb-main-btn {
    animation: vncb-shake 3s ease-in-out infinite;
}

/* Fade In Effect */
@keyframes vncb-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vncb-widget {
    animation: vncb-fadeIn 0.4s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vncb-widget {
        bottom: 16px;
        right: 16px;
    }

    .vncb-widget.position-bottom-left {
        left: 16px;
    }

    .vncb-main-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }

    .vncb-main-btn-label {
        display: none;
    }

    .vncb-channels {
        /* min-width: calc(100vw - 32px); */
        max-width: 360px;
    }

    .vncb-widget.position-bottom-right .vncb-channels {
        right: 0;
    }

    .vncb-widget.position-bottom-left .vncb-channels {
        left: 0;
    }
}

/* Scrollbar Styling */
.vncb-channels-list::-webkit-scrollbar {
    width: 6px;
}

.vncb-channels-list::-webkit-scrollbar-track {
    background: transparent;
}

.vncb-channels-list::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.vncb-channels-list::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .vncb-channels {
        background: #1F2937;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    .vncb-channels-title {
        color: #F9FAFB;
    }

    .vncb-close-btn {
        color: #9CA3AF;
    }

    .vncb-close-btn:hover {
        background: #374151;
        color: #F9FAFB;
    }

    .vncb-channel {
        color: #F9FAFB;
    }

    .vncb-channel:hover {
        background: #374151;
    }

    .vncb-channel-label {
        color: #F9FAFB;
    }

    .vncb-channel-desc {
        color: #9CA3AF;
    }
}

/* Hidden state */
.vncb-widget.hidden {
    display: none;
}

/* Hide channel labels when show_custom_labels is disabled */
.vncb-widget.hide-labels .vncb-channel-info {
    display: none !important;
}

/* ===================================
   Layout Variations
   =================================== */

/* Layout: Grid */
.vncb-widget.layout-grid {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.vncb-widget.layout-grid .vncb-main-btn {
    display: none !important;
}

.vncb-widget.layout-grid .vncb-channels {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto;
    max-height: none;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.vncb-widget.layout-grid .vncb-channels-header,
.vncb-widget.layout-grid .vncb-close-btn {
    display: none;
}

.vncb-widget.layout-grid .vncb-channels-list {
    display: contents;
    max-height: none;
}

.vncb-widget.layout-grid .vncb-channel {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-direction: column;
    text-align: center;
}

.vncb-widget.layout-grid .vncb-channel-icon {
    margin: 0 auto;
}

/* Layout: List */
.vncb-widget.layout-list {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.vncb-widget.layout-list .vncb-main-btn {
    display: none !important;
}

.vncb-widget.layout-list .vncb-channels {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto;
    max-height: none;
    background: transparent;
    box-shadow: none;
}

.vncb-widget.layout-list .vncb-channels-header,
.vncb-widget.layout-list .vncb-close-btn {
    display: none;
}

.vncb-widget.layout-list .vncb-channels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
}

.vncb-widget.layout-list .vncb-channel {
    background: white;
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Layout: Bar */
.vncb-widget.layout-bar {
    display: flex !important;
    gap: 8px;
    flex-direction: row;
    align-items: center;
}

.vncb-widget.layout-bar .vncb-main-btn {
    display: none !important;
}

.vncb-widget.layout-bar .vncb-channels {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto;
    max-height: none;
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vncb-widget.layout-bar .vncb-channels-header,
.vncb-widget.layout-bar .vncb-close-btn {
    display: none;
}

.vncb-widget.layout-bar .vncb-channels-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    max-height: none;
}

.vncb-widget.layout-bar .vncb-channel {
    padding: 8px;
    border-radius: 50%;
    min-width: auto;
}

.vncb-widget.layout-bar .vncb-channel-label {
    display: none;
}

/* Layout: Bubbles */
.vncb-widget.layout-bubbles {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}

.vncb-widget.layout-bubbles .vncb-main-btn {
    display: none !important;
}

.vncb-widget.layout-bubbles .vncb-channels {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto;
    max-height: none;
    background: transparent;
    box-shadow: none;
}

.vncb-widget.layout-bubbles .vncb-channels-header,
.vncb-widget.layout-bubbles .vncb-close-btn {
    display: none;
}

.vncb-widget.layout-bubbles .vncb-channels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: none;
    .vncb-channel-info{
        display: none;
    }
}

.vncb-widget.layout-bubbles .vncb-channel {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vncb-widget.layout-bubbles .vncb-channel-icon {
    margin: 0;
}

.vncb-widget.layout-bubbles .vncb-channel-label {
    display: none;
}
