/* Custom styles for Prism Performance Review System - Dark Theme */

/* Fast CSS tooltips. Use `data-tooltip="..."` on the element you want a hint on.
 * Avoid the native `title` attribute — browsers delay it 1-2s by default. */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    padding: 6px 9px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 4px;
    width: max-content;
    max-width: 240px;
    white-space: normal;
    text-align: left;
    z-index: 60;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    /* No delay — appear instantly. */
    transition: none;
}


/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Remove transitions on focus */
input:focus,
button:focus {
    outline: none;
    transition: none;
}

/* Form input enhancements for dark theme */
input[type="text"]:focus,
input[type="password"]:focus {
    box-shadow: 0 0 0 1px rgba(212, 255, 143, 0.5);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #6b7280;
    opacity: 1;
}

/* Button hover effects */
button {
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Keep user menu button static on hover */
#user-menu-button:hover,
#user-menu-button:active {
    transform: none !important;
}

/* Card hover effects for dark theme */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Glow animation for prism green */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 255, 143, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(212, 255, 143, 0.4);
    }
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #2d2d2d;
    border-radius: 5px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d3d3d;
}

/* Selection color to match theme */
::selection {
    background-color: rgba(212, 255, 143, 0.3);
    color: #ffffff;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Timeline Styles (light theme).
 *
 * Three visually distinct states, all WCAG-AA contrast on white:
 *   completed → muted olive-green (past — within the cycle family)
 *   upcoming  → cool slate gray   (future — clearly not-yet)
 *   active    → bright prism-green gradient (happening now, with glow)
 */
.timeline-stage-1,
.timeline-stage-2,
.timeline-stage-3,
.timeline-stage-4,
.timeline-stage-5,
.timeline-stage-6 {
    background: #c8e07c;        /* solid sage; reads as "in the cycle" */
    color: #1f2937;             /* gray-800; AAA on this bg */
}

.timeline-stage-completed {
    background: #c8e07c;
    color: #1f2937;
}

.timeline-stage-upcoming {
    background: #e2e8f0;        /* slate-200; clearly distinct from green */
    color: #475569;             /* slate-600; AA on this bg */
}

/* Active stage wins via cascade order. */
.timeline-stage-active {
    background: linear-gradient(90deg, #b3e34f, #8fc833);
    color: #0f1d05 !important;  /* darkest forest — sharp contrast on bright lime */
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(143, 200, 51, 0.55);
}

.timeline-stage-active * {
    color: #0f1d05 !important;
}

/* Cycle timeline card highlight (active vs inactive cycle) */
.cycle-card-active {
    background: linear-gradient(135deg, rgba(212, 255, 143, 0.22), rgba(168, 224, 99, 0.08));
    border-color: rgba(143, 200, 51, 0.8) !important;
}

.cycle-card-inactive {
    background: #ffffff;
    border-color: #e5e7eb !important;
}

/* Timeline animations */
@keyframes slideInTimeline {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.timeline-stage-1,
.timeline-stage-2,
.timeline-stage-3,
.timeline-stage-4,
.timeline-stage-5,
.timeline-stage-6 {
    animation: slideInTimeline 0.5s ease-out;
    transition: all 0.3s ease;
}

.timeline-stage-1:hover,
.timeline-stage-2:hover,
.timeline-stage-3:hover,
.timeline-stage-4:hover,
.timeline-stage-5:hover,
.timeline-stage-6:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
