/* ===================================
   Shared App Components
   Header/navbar, user menu, logo, dark toggle, buttons, and toast
   notifications used by every app page (everything that loads
   dashboard.css). Loaded AFTER base/variables.css and styles.css,
   BEFORE the page stylesheet.
   =================================== */

/* Ensure content clears floating controls and prevent large footer */
.container {
    padding-top: 120px;
    min-height: calc(100vh - 120px);
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* Prevent body from creating extra space */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Atmospheric floating decorations (fixed behind all content) */
.dashboard-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* Header actions on the left */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn.small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 999px; /* pill/round buttons */
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-weight: 600;
}

.nav-btn.small.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.nav-btn.small.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-btn.small.primary {
    background: var(--gradient-primary);
    color: white;
}

.nav-btn.small.primary:hover {
    transform: translateY(-2px);
}

.nav-btn.small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .dashboard-header {
    border-bottom: 1px solid var(--border-color);
}

/* Dark mode fade effect for mobile user-menu */
@media (max-width: 768px) {
    [data-theme="dark"] .user-menu {
        background: none;
    }
}

/* Logo styles for dashboard */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo .logo-img {
    max-height: 50px;
    width: auto;
    margin-right: 12px;
    transition: var(--transition);
}

.logo .logo-img.rounded {
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    padding: 2px;
}

.logo .logo-img:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

#username {
    font-weight: 600;
    display: block;
}

.anonymous-badge {
    font-size: 0.75rem;
    background: var(--water-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    display: inline-block;
    margin-top: 0.25rem;
    font-weight: 700;
}

[data-theme="dark"] .anonymous-badge {
    border-color: rgba(255, 255, 255, 0.12);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark mode toggle */
.dark-toggle {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    border-radius: 5px;
    width: 200px;
    z-index: 100;
    margin-top: 0.5rem;
    display: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
}

.dropdown-menu li {
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .dropdown-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Themed Buttons (align with landing/login) */
.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    height: 48px;
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn.primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn.primary:hover {
    transform: translateY(-2px);
}

.btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.6s ease;
}

.btn.primary:hover::before { left: 100%; }

.btn.secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--gray-light, #e2e8f0);
}

.btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary, #7c6cf5);
    color: var(--primary, #7c6cf5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.activity-detail-content {
    margin-bottom: 1.5rem;
}

.detail-item {
    margin-bottom: 1rem;
}

.detail-label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
    color: #666;
}

[data-theme="dark"] .detail-label {
    color: #aaa;
}

.detail-value {
    color: var(--text-color);
}

.detail-notes {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

[data-theme="dark"] .detail-notes {
    background-color: rgba(255, 255, 255, 0.05);
}

.detail-rating {
    display: flex;
    margin-top: 0.5rem;
}

.rating-star {
    color: #ddd;
    font-size: 1.2rem;
    margin-right: 0.2rem;
}

.rating-star.filled {
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Notification System */
/* ── Toast Notifications ───────────────────────────── */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.1rem;
    border-radius: 14px;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(18, 14, 35, 0.92);
    border: 1px solid rgba(124, 108, 245, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(calc(100% + 32px));
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    z-index: 12001;
    max-width: 360px;
    min-width: 220px;
    pointer-events: none;
}

[data-theme="light"] .notification {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 108, 245, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04) inset;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Left accent bar */
.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

/* Icon */
.notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.notif-msg {
    flex: 1;
    line-height: 1.4;
}

/* Type variants */
.notification-success::before { background: #22c55e; }
.notification-success .notif-icon { background: rgba(34, 197, 94, 0.12); color: #22c55e; }

.notification-error::before { background: #ef4444; }
.notification-error .notif-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.notification-info::before { background: var(--primary-color); }
.notification-info .notif-icon { background: rgba(124, 108, 245, 0.12); color: var(--primary-color); }

.notification-warning::before { background: #f59e0b; }
.notification-warning .notif-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

/* Backward-compat aliases */
.notification.success { }
.notification.error   { }

@media (max-width: 640px) {
    .notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        transform: translateY(calc(100% + 24px));
    }
}

/* Disabled notice styling */
.disabled-notice {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}


