/* Orbital Timeline Component - EXACT implementation from orbital-timeline.md */

/* Layout utilities */
.w-full {
    width: 100%;
}

.h-screen {
    height: 100vh;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.bg-black {
    background-color: black;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.max-w-4xl {
    max-width: 56rem;
}

.h-full {
    height: 100%;
}

/* Central Hub Styles - EXACT from spec */
.w-16 {
    width: 4rem;
}

.h-16 {
    height: 4rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.w-24 {
    width: 6rem;
}

.h-24 {
    height: 6rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.rounded-full {
    border-radius: 50%;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-purple-500 {
    --tw-gradient-from: #8b5cf6;
    --tw-gradient-to: rgb(139 92 246 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-blue-500 {
    --tw-gradient-to: rgb(59 130 246 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), #3b82f6, var(--tw-gradient-to);
}

.to-teal-500 {
    --tw-gradient-to: #14b8a6;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.z-10 {
    z-index: 10;
}

.border {
    border-width: 1px;
}

.border-white\/20 {
    border-color: rgb(255 255 255 / 0.2);
}

.border-white\/10 {
    border-color: rgb(255 255 255 / 0.1);
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.opacity-70 {
    opacity: 0.7;
}

.opacity-50 {
    opacity: 0.5;
}

.bg-white\/80 {
    background-color: rgb(255 255 255 / 0.8);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

/* Orbital Ring */
.w-96 {
    width: 24rem;
}

.h-96 {
    height: 24rem;
}

/* Timeline Node Styles */
.timeline-node {
    position: absolute;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.node-energy-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.node-energy-glow.pulsing {
    animation: pulse 1s ease-in-out infinite;
}

.node-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    transition: all 0.3s ease;
    transform-origin: center;
}

.node-icon.expanded {
    background-color: white;
    color: black;
    border-color: white;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
    transform: scale(1.5);
}

.node-icon.related {
    background-color: rgba(255, 255, 255, 0.5);
    color: black;
    border-color: white;
    animation: pulse 1s ease-in-out infinite;
}

.node-icon.default {
    background-color: black;
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.node-title {
    position: absolute;
    top: 3rem;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.node-title.expanded {
    color: white;
    transform: scale(1.25);
}

/* Card Styles */
.node-card {
    position: absolute;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16rem;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px rgba(255, 255, 255, 0.1);
    overflow: visible;
    color: white;
}

.card-connector {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 0.75rem;
    background-color: rgba(255, 255, 255, 0.5);
}

.card-header {
    padding: 0.5rem;
    padding-bottom: 0.5rem;
}

.card-content {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 0.5rem 0.5rem;
}

.status-badge {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.status-completed {
    color: white;
    background-color: black;
    border: 1px solid white;
}

.status-in-progress {
    color: black;
    background-color: white;
    border: 1px solid black;
}

.status-pending {
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.energy-bar {
    width: 100%;
    height: 0.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    transition: width 0.5s ease;
}

.related-nodes {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-button {
    display: inline-flex;
    align-items: center;
    height: 1.5rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.125rem;
}

.related-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .w-96 {
        width: 15rem; /* Smaller orbital ring for mobile */
    }

    .h-96 {
        height: 15rem;
    }

    .node-card {
        width: 12rem;
        font-size: 0.75rem;
    }

    .node-icon {
        width: 2rem;
        height: 2rem;
    }

    .node-title {
        font-size: 0.625rem;
        top: 2.5rem;
    }

    .w-16 {
        width: 3rem; /* Smaller central hub */
    }

    .h-16 {
        height: 3rem;
    }

    .w-8 {
        width: 1.5rem;
    }

    .h-8 {
        height: 1.5rem;
    }

    .max-w-4xl {
        max-width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .w-96 {
        width: 12rem; /* Even smaller for very small screens */
    }

    .h-96 {
        height: 12rem;
    }

    .node-card {
        width: 10rem;
        font-size: 0.625rem;
    }

    .node-icon {
        width: 1.5rem;
        height: 1.5rem;
    }

    .node-title {
        font-size: 0.5rem;
        top: 2rem;
    }
}

/* Animation Utilities */
.transition-all {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-700 {
    transition-duration: 700ms;
}

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
