﻿/* ====================================================================
   ChillXand Main Stylesheet
   Shared styles for chillxand.com and docs.chillxand.com
   ==================================================================== */

/* ====================================================================
   CORE UTILITIES
   ==================================================================== */

/* Hide Alpine.js elements before initialization */
[x-cloak] { 
    display: none !important; 
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* ====================================================================
   ANIMATIONS
   ==================================================================== */

/* Pulse animation for status indicators */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.status-pulse { 
    animation: pulse-dot 2s ease-in-out infinite; 
}

/* Gradient shift animation */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Glow pulse effect */
@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(13, 148, 136, 0.4), 
                    0 0 40px rgba(13, 148, 136, 0.2), 
                    0 0 60px rgba(13, 148, 136, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(13, 148, 136, 0.6), 
                    0 0 60px rgba(13, 148, 136, 0.4), 
                    0 0 90px rgba(13, 148, 136, 0.2);
    }
}
.glow-pulse { 
    animation: glow-pulse 2s ease-in-out infinite; 
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.float { 
    animation: float 3s ease-in-out infinite; 
}

/* Shimmer effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Heartbeat animation for CTA cards */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.03); }
    50% { transform: scale(1); }
    75% { transform: scale(1.03); }
}
.heartbeat-card {
    animation: heartbeat 2.5s ease-in-out infinite;
}
.heartbeat-card:hover {
    animation: none;
}

/* ====================================================================
   HEADER - RESPONSIVE APP BUTTONS
   ==================================================================== */

/* Hide centered app links on tablets and smaller */
@media (max-width: 1024px) {
    .header-app-links {
        display: none !important;
    }
}

/* Medium-large screens - prevent overlap */
@media (min-width: 1024px) and (max-width: 1280px) {
    .header-app-links a {
        padding-left: 0.625rem !important;
        padding-right: 0.625rem !important;
        font-size: 0.8125rem !important;
    }
}

/* Extra large screens - normal size */
@media (min-width: 1280px) {
    .header-app-links a {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* Prevent text wrapping in header links */
.header-app-links span {
    white-space: nowrap;
}

/* ====================================================================
   PNODE-VIZ COUNTDOWN & DISABLED LINK
   ==================================================================== */

.pnodeviz-link-disabled {
    position: relative;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.pnodeviz-link-disabled:hover::after {
    content: attr(data-countdown);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #14b8a6;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pnodeviz-link-disabled:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #14b8a6;
    margin-bottom: 2px;
}

/* ====================================================================
   WALLET TOKEN SLIDER
   ==================================================================== */

.token-slider {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #14b8a6 #f3f4f6;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
}

.token-slider::-webkit-scrollbar {
    height: 6px;
}

.token-slider::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.dark .token-slider::-webkit-scrollbar-track {
    background: #374151;
}

.token-slider::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 3px;
}

.token-slider::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

.token-mini-card {
    min-width: 200px;
    flex-shrink: 0;
}

/* ====================================================================
   MOBILE RESPONSIVE - TOKEN CARDS
   ==================================================================== */

@media (max-width: 640px) {
    /* Token card content switches to vertical stack */
    .token-card-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }
    
    /* Token name on first line */
    .token-name-wrapper {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Balance and value on second line */
    .token-value-wrapper {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    /* Adjust card padding for mobile */
    .token-card-mobile {
        padding: 0.75rem !important;
    }
    
    /* Smaller mini cards on mobile */
    .token-mini-card {
        min-width: 160px;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .token-value-wrapper {
        font-size: 0.75rem;
    }
}

/* ====================================================================
   DOCUMENTATION SPECIFIC STYLES
   ==================================================================== */

/* Code block styling */
pre {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Code in documentation has green text */
.docs-page code {
    color: #10b981;
}

/* Inline code snippets */
:not(pre) > code {
    background: rgba(13, 148, 136, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

/* Copy button for code blocks */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* Sidebar navigation active link */
.nav-link-active {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.1) 0%, transparent 100%);
    border-left: 3px solid #0D9488;
    color: #0D9488;
}

/* Search highlight in docs */
.search-highlight {
    background-color: rgba(13, 148, 136, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* ====================================================================
   UTILITY CLASSES
   ==================================================================== */

/* Truncate text with ellipsis */
.truncate-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* Gradient text helpers */
.gradient-text-brand {
    background: linear-gradient(90deg, #0D9488, #EA580C, #7C3AED);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Border gradient animation */
@keyframes border-glow {
    0%, 100% {
        border-color: rgba(20, 184, 166, 0.3);
        box-shadow: 0 0 20px rgba(20, 184, 166, 0.2);
    }
    50% {
        border-color: rgba(20, 184, 166, 0.6);
        box-shadow: 0 0 30px rgba(20, 184, 166, 0.4);
    }
}

.border-glow-animate {
    animation: border-glow 2.5s ease-in-out infinite;
}
/* ====================================================================
   ChillXand Sidebar System - CSS Additions
   
   Add these styles to your chillxand-styles.css file
   ==================================================================== */

/* ====================================================================
   SIDEBAR TOGGLE BUTTON
   ==================================================================== */

.sidebar-toggle-button {
    position: fixed;
    top: 4rem; /* 64px - below header */
    left: 1rem;
    z-index: 40;
}

/* On desktop, hide the toggle button */
@media (min-width: 1024px) {
    .sidebar-toggle-button {
        display: none;
    }
}

/* ====================================================================
   SIDEBAR POSITIONING
   ==================================================================== */

/* Desktop - Sticky sidebar */
@media (min-width: 1024px) {
    .docs-sidebar {
        position: sticky;
        top: 3.5rem; /* Below header */
        height: calc(100vh - 3.5rem);
    }
}

/* Mobile - Fixed overlay sidebar */
@media (max-width: 1023px) {
    .docs-sidebar {
        position: fixed;
        top: 3.5rem;
        left: 0;
        z-index: 30;
    }
}

/* ====================================================================
   SIDEBAR CONTENT LAYOUT ADJUSTMENTS
   ==================================================================== */

/* Main content area when sidebar is present */
.has-docs-sidebar {
    display: flex;
    flex: 1;
}

/* On mobile, content takes full width */
@media (max-width: 1023px) {
    .has-docs-sidebar .main-content {
        flex: 1;
        width: 100%;
    }
}

/* On desktop, content adjusts for sidebar */
@media (min-width: 1024px) {
    .has-docs-sidebar .main-content {
        flex: 1;
        margin-left: 0;
    }
}

/* ====================================================================
   SIDEBAR SCROLLBAR STYLING
   ==================================================================== */

.docs-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(13, 148, 136, 0.3) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(13, 148, 136, 0.3);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 148, 136, 0.5);
}

/* Dark mode scrollbar */
.dark .docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(13, 148, 136, 0.4);
}

.dark .docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 148, 136, 0.6);
}

/* ====================================================================
   ACTIVE LINK STYLING
   ==================================================================== */

.nav-link-active {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.1) 0%, transparent 100%);
    border-left: 3px solid #0D9488 !important;
    color: #0D9488 !important;
}

.dark .nav-link-active {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.2) 0%, transparent 100%);
    color: #14b8a6 !important;
}

/* ====================================================================
   SECTION HEADER HOVER EFFECTS
   ==================================================================== */

.sidebar-section-header {
    transition: all 0.2s ease;
}

.sidebar-section-header:hover {
    background-color: rgba(13, 148, 136, 0.05);
}

.dark .sidebar-section-header:hover {
    background-color: rgba(13, 148, 136, 0.1);
}

/* ====================================================================
   SIDEBAR OVERLAY (MOBILE)
   ==================================================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 25;
}

/* ====================================================================
   SIDEBAR TRANSITIONS
   ==================================================================== */

/* Mobile slide-in animation */
@media (max-width: 1023px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .docs-sidebar.sidebar-open {
        transform: translateX(0);
    }
}

/* Desktop - no transition needed, always visible */
@media (min-width: 1024px) {
    .docs-sidebar {
        transform: translateX(0);
        transition: none;
    }
}

/* ====================================================================
   SIDEBAR SECTION COLLAPSE ANIMATION
   ==================================================================== */

.sidebar-section-content {
    transition: all 0.3s ease;
}

/* Chevron rotation */
.chevron-icon {
    transition: transform 0.2s ease;
}

.chevron-rotated {
    transform: rotate(180deg);
}

/* ====================================================================
   RESPONSIVE ADJUSTMENTS
   ==================================================================== */

/* Adjust main content top padding when sidebar button is visible */
@media (max-width: 1023px) {
    .has-docs-sidebar .main-content {
        padding-top: 1rem;
    }
}

/* ====================================================================
   PRINT STYLES
   ==================================================================== */

@media print {
    .sidebar-toggle-button,
    .sidebar-overlay,
    .docs-sidebar {
        display: none !important;
    }
    
    .has-docs-sidebar .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ====================================================================
   ACCESSIBILITY - FOCUS STATES
   ==================================================================== */

.docs-sidebar a:focus,
.docs-sidebar button:focus,
.sidebar-toggle-button:focus {
    outline: 2px solid #0D9488;
    outline-offset: 2px;
}

/* ====================================================================
   REDUCED MOTION
   ==================================================================== */

@media (prefers-reduced-motion: reduce) {
    .docs-sidebar,
    .sidebar-section-content,
    .chevron-icon {
        transition: none !important;
    }
}

/* ====================================================================
   SIDEBAR BADGE (For future use - notifications, counts, etc.)
   ==================================================================== */

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    background-color: #0D9488;
    color: white;
}

/* ====================================================================
   SMOOTH SCROLL FOR ANCHOR LINKS
   ==================================================================== */

html {
    scroll-behavior: smooth;
}

/* Offset for sticky header when jumping to anchors */
:target {
    scroll-margin-top: 4rem;
}