/*
 * PeerMesh Docker Lab Dashboard - Custom Styles
 * These are minimal overrides for Tailwind CSS
 * Dark mode is the default theme
 */

:root {
    /* Dark mode color palette */
    --color-bg-primary: #111827;      /* gray-900 */
    --color-bg-secondary: #1f2937;    /* gray-800 */
    --color-bg-tertiary: #374151;     /* gray-700 */
    --color-text-primary: #f3f4f6;    /* gray-100 */
    --color-text-secondary: #9ca3af;  /* gray-400 */
    --color-text-muted: #6b7280;      /* gray-500 */
    --color-accent: #0ea5e9;          /* primary-500 */
    --color-accent-hover: #0284c7;    /* primary-600 */
    --color-border: #374151;          /* gray-700 */

    /* Status colors */
    --color-success: #22c55e;         /* green-500 */
    --color-warning: #f59e0b;         /* amber-500 */
    --color-error: #ef4444;           /* red-500 */
    --color-info: #3b82f6;            /* blue-500 */
}

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom background shade not in default Tailwind */
.bg-gray-750 {
    background-color: #2d3748;
}

/* Code block styling */
code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.875em;
}

pre {
    scrollbar-width: thin;
    scrollbar-color: var(--color-bg-tertiary) var(--color-bg-primary);
}

pre::-webkit-scrollbar {
    height: 6px;
}

pre::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* Status indicators */
.status-healthy {
    color: var(--color-success);
}

.status-unhealthy {
    color: var(--color-error);
}

.status-warning {
    color: var(--color-warning);
}

.status-pending {
    color: var(--color-text-muted);
}

/* Card hover effects */
.card-interactive {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Pulse animation for status indicators */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse-slow {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-tertiary) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}

/* ====================
   Guest/Demo Mode Styles
   ==================== */

/* Guest mode disabled elements */
.guest-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    position: relative;
}

.guest-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: not-allowed;
    pointer-events: auto;
}

/* Override pointer-events for click handling */
.guest-disabled[data-guest-clickable] {
    pointer-events: auto;
}

/* Guest disabled button specific styles */
button.guest-disabled,
.btn.guest-disabled {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-muted) !important;
}

button.guest-disabled:hover,
.btn.guest-disabled:hover {
    background-color: var(--color-bg-tertiary) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Guest tooltip animation */
.guest-tooltip {
    animation: guest-tooltip-appear 0.2s ease-out;
}

@keyframes guest-tooltip-appear {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Guest mode banner animation */
#guest-mode-banner {
    animation: guest-banner-slide 0.3s ease-out;
}

@keyframes guest-banner-slide {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Guest badge pulse */
#guest-badge {
    animation: guest-badge-pulse 2s ease-in-out infinite;
}

@keyframes guest-badge-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Visually indicate disabled state for interactive elements */
.guest-disabled a,
.guest-disabled button,
.guest-disabled input,
.guest-disabled select,
.guest-disabled textarea {
    pointer-events: none;
}

/* Guest mode link in banner */
#guest-mode-banner a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.15s ease;
}

#guest-mode-banner a:hover {
    color: white;
}
