/* User Popup Styles */

/* Popup Container - Hidden by default */
.user-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-height: 400px;
    background-color: var(--secondary-color);
    border: 1px solid var(--color-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow-y: auto;
}

/* Visible state for JavaScript toggle */
.user-popup.visible {
    display: block;
    animation: fadeSlideDown 200ms ease-out;
}

/* Fade-in and slide-down animation */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Popup content wrapper */
.user-popup-content {
    padding: 0;
}

/* Popup sections */
.user-popup-section {
    padding: 16px;
}

/* User info section */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
}

.user-info i {
    font-size: 32px;
    color: var(--color-light);
}

.user-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Popup message */
.user-popup-message {
    margin: 0;
    font-size: 13px;
    color: var(--text-color);
    text-align: center;
}

/* Divider between sections */
.user-popup-divider {
    height: 1px;
    background-color: var(--color-light);
    opacity: 0.3;
    margin: 0;
}

/* Google login button */
.google-login-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--highlight-color);
    color: var(--color-dark);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 150ms ease;
}

.google-login-btn:hover {
    background-color: #f8c04f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(247, 181, 56, 0.3);
}

.google-login-btn:active {
    transform: translateY(0);
}

.google-login-btn i {
    font-size: 16px;
}

/* Sign out option */
.user-popup-option {
    width: 100%;
    padding: 12px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 150ms ease;
    text-align: left;
}

.user-popup-option:hover {
    background-color: var(--color-light);
}

.user-popup-option i {
    font-size: 14px;
    color: var(--text-color);
}

/* Form styling */
.user-popup form {
    margin: 0;
}

/* Responsive behavior for mobile devices */
@media (max-width: 768px) {
    .user-popup {
        width: 260px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .user-popup {
        width: calc(100vw - 40px);
        max-width: 280px;
        right: -20px;
    }
    
    .user-popup-section {
        padding: 12px;
    }
    
    .google-login-btn,
    .user-popup-option {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Scrollbar styling for popup overflow */
.user-popup::-webkit-scrollbar {
    width: 6px;
}

.user-popup::-webkit-scrollbar-track {
    background: var(--secondary-color-dark);
    border-radius: 3px;
}

.user-popup::-webkit-scrollbar-thumb {
    background: var(--color-light);
    border-radius: 3px;
}

.user-popup::-webkit-scrollbar-thumb:hover {
    background: var(--color);
}
