/* Shared Event Page Styles
 * Used across all event pages for consistent appearance
 * Version: 1.0.1
 */

/* ===========================================
   Skeleton Loading Animation
   =========================================== */
.skeleton-text {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    display: inline-block;
    min-width: 80px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Remove skeleton class when content loads */
.skeleton-text.loaded {
    background: none;
    animation: none;
    color: inherit !important;
    min-width: auto;
}

/* ===========================================
   Fixed header container
   =========================================== */
.tab-container {
    background: linear-gradient(135deg, #5a67d8, #667eea);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-nav-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Return to hub button */
.return-hub-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

.return-hub-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

.return-hub-btn i {
    font-size: 0.9rem;
}

/* Event type badge */
.event-type-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
}

.event-type-badge.fishing {
    background: rgba(59, 130, 246, 0.3);
}

.event-type-badge.cooking {
    background: rgba(249, 115, 22, 0.3);
}

.event-type-badge.hunting {
    background: rgba(239, 68, 68, 0.3);
}

.event-type-badge.mining {
    background: rgba(168, 85, 247, 0.3);
}

.event-type-badge.bug {
    background: rgba(34, 197, 94, 0.3);
}

/* Tab list */
.tab-list {
    display: flex;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Tab buttons */
.tab-button {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-button i {
    font-size: 0.85rem;
}

.tab-button.active,
.tab-button:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.tab-button.active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Host badge on tabs */
.host-badge {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.3rem;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

/* Notification button */
.icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #5a67d8;
}

/* Host action buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 0.9rem;
}

/* Main content area - only for event pages with .event-page class on body */
body.event-page {
    padding-top: 60px; /* Account for fixed header */
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tab content panels */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Host-only elements */
.host-only {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .tab-container {
        padding: 0 1rem;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
    }

    .tab-nav-section {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    .event-type-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .tab-list {
        flex-wrap: wrap;
    }

    .tab-button span {
        display: none;
    }

    .tab-button {
        padding: 0.5rem;
        width: 36px;
        height: 36px;
        justify-content: center;
    }

    .main-content {
        padding: 1rem;
    }
}

/* Demo-specific styles */
.demo-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.demo-card h2 {
    color: #5a67d8;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-card h3 {
    color: #667eea;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.demo-card p {
    color: #64748b;
    line-height: 1.6;
}

.demo-card ul {
    color: #64748b;
}

.demo-card code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #5a67d8;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.feature-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #5a67d8;
}

.feature-item h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-indicator.success {
    background: #dcfce7;
    color: #16a34a;
}

.status-indicator.info {
    background: #dbeafe;
    color: #2563eb;
}

.status-indicator.warning {
    background: #fef3c7;
    color: #d97706;
}

/* Notification Panel Styles */
.notification-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 2000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-panel-header {
    background: linear-gradient(135deg, #5a67d8, #667eea);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.notification-panel-header .clear-all-btn {
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.notification-panel-header .clear-all-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: translateY(-1px);
}

.notification-panel-header .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-panel-header .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.notification-panel-content {
    max-height: 540px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #f0f9ff;
}

.unread-indicator {
    position: absolute;
    top: 50%;
    left: 0.5rem;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #dbeafe;
}

.notification-item.unread:hover {
    background: #e0f2fe;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5a67d8, #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.notification-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-item.clickable {
    cursor: pointer;
}

.notification-item.clickable:hover {
    background: #e0f2fe;
    transform: translateX(4px);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.no-notifications {
    text-align: center;
    padding: 3rem 2rem;
    color: #9ca3af;
}

.no-notifications i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-notifications p {
    margin: 0;
    font-size: 1rem;
}

/* Theme toggle button in header */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* ===========================================
   DARK MODE STYLES FOR EVENT PAGES
   =========================================== */

/* Main content area */
[data-theme="dark"] .main-content {
    background: var(--bg-primary);
}

[data-theme="dark"] body.event-page {
    background: var(--bg-primary);
}

/* Tab buttons in dark mode */
[data-theme="dark"] .tab-button {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .tab-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

[data-theme="dark"] .tab-button.active {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: none !important;
}

/* Cooking/Fishing event container */
[data-theme="dark"] .cooking-event-container {
    background: var(--bg-primary);
}

/* Event header card (Option 6+8 hybrid) */
[data-theme="dark"] .option68v3-header {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
}

/* Action bar at bottom */
[data-theme="dark"] .action-bar {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .action-bar .btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .action-bar .btn:hover {
    background: var(--bg-hover);
    border-color: #667eea;
}

[data-theme="dark"] .action-bar .event-status {
    color: var(--text-secondary);
}

[data-theme="dark"] .action-bar .status-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

/* Participants section */
[data-theme="dark"] .participants-collapse-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .participants-collapse-toggle {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .participants-collapse-toggle:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .participants-collapse-content {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .participants-grid {
    background: transparent;
}

[data-theme="dark"] .participants-empty {
    color: var(--text-muted);
}

[data-theme="dark"] .participants-empty i {
    color: var(--text-muted);
}

/* Participant cards */
[data-theme="dark"] .participant-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .participant-card:hover {
    background: var(--bg-hover);
    border-color: #667eea;
}

[data-theme="dark"] .participant-name {
    color: var(--text-primary);
}

[data-theme="dark"] .participant-status {
    color: var(--text-secondary);
}

/* Fishing section */
[data-theme="dark"] .fishing-section {
    background: var(--bg-primary);
}

[data-theme="dark"] .fishing-section h3 {
    color: var(--text-primary);
}

/* Fish and location cards */
[data-theme="dark"] .selected-fish-section,
[data-theme="dark"] .selected-location-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

[data-theme="dark"] .target-fish-card,
[data-theme="dark"] .target-location-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .secondary-fish-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .fish-by-bait {
    background: var(--bg-tertiary);
}

/* Loading overlay */
[data-theme="dark"] .loading-overlay {
    background: var(--bg-primary);
}

[data-theme="dark"] .loading-content {
    color: var(--text-primary);
}

[data-theme="dark"] .loading-text {
    color: var(--text-primary);
}

[data-theme="dark"] .loading-details {
    color: var(--text-secondary);
}

/* Notification items in dark mode */
[data-theme="dark"] .notification-item.clickable:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .notification-title {
    color: var(--text-primary);
}

[data-theme="dark"] .notification-message {
    color: var(--text-secondary);
}

[data-theme="dark"] .notification-time {
    color: var(--text-muted);
}

[data-theme="dark"] .no-notifications {
    color: var(--text-muted);
}