/**
 * CalWhat 認證相關樣式
 */

/* ===== 登入按鈕 ===== */
.auth-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-button-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.auth-button-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.auth-button-login i {
    font-size: 16px;
}

/* ===== 使用者資訊 ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 下拉選單 ===== */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.user-dropdown-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.user-dropdown-email {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.user-dropdown-item i {
    width: 20px;
    text-align: center;
    color: #666;
}

.user-dropdown-item.logout {
    color: #dc3545;
    border-top: 1px solid #eee;
}

.user-dropdown-item.logout i {
    color: #dc3545;
}

/* ===== 同步狀態指示器 ===== */
.sync-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.sync-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
}

.sync-indicator-dot.syncing {
    background-color: #ffc107;
    animation: pulse 1s infinite;
}

.sync-indicator-dot.error {
    background-color: #dc3545;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== 響應式調整 ===== */
@media (max-width: 768px) {
    .auth-button span {
        display: none;
    }

    .auth-button {
        padding: 8px 12px;
    }

    .user-name {
        display: none;
    }

    .user-dropdown-toggle {
        padding: 4px;
    }
}

/* ===== Google 登入按鈕樣式 ===== */
.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333;
}

.btn-google img {
    width: 20px;
    height: 20px;
}
