/**
 * Comunation.com App Launcher Styles
 * Self-contained widget CSS - cannot be overridden
 */

/* CSS Reset for Apps Drawer Elements - Selective isolation */
.app-launcher-button,
.app-launcher-menu,
.app-launcher-header,
.app-launcher-title,
.app-launcher-logo,
.app-launcher-grid,
.app-launcher-item,
.app-launcher-icon,
.app-launcher-name,
.app-launcher-footer,
.app-launcher-status,
.app-launcher-auth,
.user-name,
.auth-btn {
    /* Only reset properties that could be overridden, keep layout intact */
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    text-align: left !important;
    vertical-align: baseline !important;
    list-style: none !important;
    quotes: none !important;
    content: none !important;
}

/* App Launcher Button - Self-contained styles */
.app-launcher-button {
    position: fixed !important;
    top: 13px !important;
    right: 20px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2000 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.app-launcher-button:hover {
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.05) !important;
}

.app-launcher-button.active {
    background: #4285f4 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3) !important;
}

.app-launcher-button svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* App Launcher Menu - Self-contained styles */
.app-launcher-menu {
    position: fixed !important;
    top: 85px !important;
    right: 20px !important;
    width: 320px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    z-index: 3000 !important;
    display: none !important;
    opacity: 0 !important;
    transform: translateY(-10px) scale(0.95) !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.app-launcher-menu.open {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    display: block !important;
}

/* App Launcher Header - Self-contained styles */
.app-launcher-header {
    padding: 16px 20px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%) !important;
    border-radius: 12px 12px 0 0 !important;
    color: white !important;
}

.app-launcher-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

.app-launcher-title svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

.app-launcher-logo {
    width: 44px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* App Launcher Grid */
.app-launcher-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    padding: 20px !important;
    background: white !important;
}

.app-launcher-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    color: #333 !important;
}

.app-launcher-item:hover {
    background: rgba(66, 133, 244, 0.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.app-launcher-icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 8px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8f9fa !important;
    transition: all 0.2s ease !important;
}

.app-launcher-item:hover .app-launcher-icon {
    background: #e8f0fe !important;
    transform: scale(1.1) !important;
}

.app-launcher-icon img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
}

.app-launcher-name {
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: center !important;
    color: #5f6368 !important;
    line-height: 1.2 !important;
}

.app-launcher-item:hover .app-launcher-name {
    color: #1a73e8 !important;
}

/* App Launcher Footer */
.app-launcher-footer {
    padding: 12px 20px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: #f8f9fa !important;
    border-radius: 0 0 12px 12px !important;
    font-size: 12px !important;
    color: #5f6368 !important;
}

/* Auth Section */
.app-launcher-auth {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.user-name {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
}

.auth-btn {
    background: #4285f4 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    margin-right: 8px !important;
    margin-bottom: 4px !important;
}

.auth-btn:hover {
    background: #3367d6 !important;
}

.auth-btn:last-child {
    margin-right: 0 !important;
}

#guest-info .auth-btn:first-child {
    background: #34a853 !important;
}

#guest-info .auth-btn:first-child:hover {
    background: #2d8f47 !important;
}

#guest-info .auth-btn:last-child {
    background: #ea4335 !important;
}

#guest-info .auth-btn:last-child:hover {
    background: #d33b2c !important;
}

.app-launcher-status {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.app-launcher-status .online {
    color: #34a853 !important;
    font-weight: 500 !important;
}

.app-launcher-status .offline {
    color: #ea4335 !important;
    font-weight: 500 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-launcher-button {
        top: 15px !important;
        right: 15px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .app-launcher-menu {
        top: 60px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
    }

    .app-launcher-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    .app-launcher-item {
        padding: 8px 4px !important;
    }

    .app-launcher-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .app-launcher-icon img {
        width: 28px !important;
        height: 28px !important;
    }

    .app-launcher-name {
        font-size: 11px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .app-launcher-button {
        background: rgba(32, 33, 36, 0.9) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: #e8eaed !important;
    }

    .app-launcher-button:hover {
        background: rgba(32, 33, 36, 1) !important;
    }

    .app-launcher-menu {
        background: #2d2e30 !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    .app-launcher-grid {
        background: #2d2e30 !important;
    }

    .app-launcher-item {
        color: #e8eaed !important;
    }

    .app-launcher-item:hover {
        background: rgba(66, 133, 244, 0.2) !important;
    }

    .app-launcher-icon {
        background: #3c4043 !important;
    }

    .app-launcher-item:hover .app-launcher-icon {
        background: #5f6368 !important;
    }

    .app-launcher-name {
        color: #9aa0a6 !important;
    }

    .app-launcher-item:hover .app-launcher-name {
        color: #8ab4f8 !important;
    }

    .app-launcher-footer {
        background: #3c4043 !important;
        color: #9aa0a6 !important;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0 !important;
        transform: translateY(10px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.app-launcher-item {
    animation: fadeInUp 0.3s ease forwards !important;
}

.app-launcher-item:nth-child(1) { animation-delay: 0.1s; }
.app-launcher-item:nth-child(2) { animation-delay: 0.2s; }
.app-launcher-item:nth-child(3) { animation-delay: 0.3s; }
.app-launcher-item:nth-child(4) { animation-delay: 0.4s; }
.app-launcher-item:nth-child(5) { animation-delay: 0.5s; }
.app-launcher-item:nth-child(6) { animation-delay: 0.6s; }












