/* Microsoft Teams Widget Styles */
.teams-widget {
    position: fixed;
    right: 20px;
    bottom: 240px; /* Increased spacing to prevent overlap */
    z-index: 9999;
    transition: all 0.3s ease;
}

.teams-icon {
    width: 60px;
    height: 60px;
    background: #464EB8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(70, 78, 184, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.teams-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(70, 78, 184, 0.6);
}

.teams-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Pulse animation */
.teams-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: #464EB8;
    animation: teams-pulse 2s infinite;
    z-index: -1;
}

@keyframes teams-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Tooltip */
.teams-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.teams-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #1f2937;
}

.teams-widget:hover .teams-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .teams-widget {
        right: 15px;
        bottom: 180px; /* Adjusted spacing relative to WhatsApp widget */
    }
    
    .teams-icon {
        width: 50px;
        height: 50px;
    }
    
    .teams-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .teams-tooltip {
        font-size: 12px;
        padding: 8px 12px;
        right: 60px;
    }
}

@media (max-width: 480px) {
    .teams-widget {
        right: 10px;
        bottom: 155px; /* Adjusted spacing for small mobile */
    }
    
    .teams-icon {
        width: 45px;
        height: 45px;
    }
    
    .teams-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .teams-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        right: 55px;
    }
}

@media (max-width: 360px) {
    .teams-widget {
        right: 8px;
        bottom: 130px; /* Even tighter spacing for very small screens */
    }
    
    .teams-icon {
        width: 40px;
        height: 40px;
    }
    
    .teams-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .teams-tooltip {
        background: #374151;
        border: 1px solid #4b5563;
    }
    
    .teams-tooltip::after {
        border-left-color: #374151;
    }
}

/* Animation for entrance */
.teams-widget {
    animation: teams-slide-in 0.5s ease-out;
}

@keyframes teams-slide-in {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
