/* Family Assistant Widget */
.family-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    /* Allow clicking through when empty */
}

.family-notification {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-width: 350px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.family-notification.show {
    transform: translateX(0);
}

.family-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-right: 15px;
    flex-shrink: 0;
}

.family-content {
    flex: 1;
}

.family-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-blue, #2196F3);
    margin-bottom: 2px;
    display: block;
}

.family-message {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
    margin: 0;
}

.family-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.family-close:hover {
    color: #f44336;
}

/* Typing indicator for realism */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}