/* Custom Styling Extensions for Lifecycle Operations Console */

:root {
    --primary: #5B21B6;      /* Deep Purple */
    --primary-light: #C084FC;/* Light Purple */
    --bg-main: #FAFAF9;      /* Off-white Sand */
    --border-color: rgba(229, 231, 235, 0.4); /* Extremely subtle, semi-transparent border */
    --text-main: #1F2937;    /* Slate */
}

/* Base Adjustments */
body {
    background-color: var(--bg-main);
    overflow-y: scroll;
    letter-spacing: -0.011em;
}

/* Global Border Softening Override */
*, *::before, *::after {
    border-color: rgba(229, 231, 235, 0.4) !important;
}

/* Glassmorphism Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: 0 4px 20px -2px rgba(91, 33, 182, 0.03);
}

/* Slide-out Drawer Base */
#case-drawer {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#case-drawer.open {
    transform: translateX(0);
}

/* Overlay Background */
#drawer-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#drawer-overlay.active {
    opacity: 0.4;
    pointer-events: auto;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.25s ease forwards;
}

/* Custom Interactive States */
.heatmap-cell {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.heatmap-cell:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 10px rgba(91, 33, 182, 0.15);
    z-index: 10;
}

/* Progress Steps bar indicators */
.step-dot {
    transition: all 0.3s ease;
}

.step-dot.active {
    background-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 33, 182, 0.15);
}

.step-dot.completed {
    background-color: #10B981;
}

/* Pareto and Custom Bar components */
.bar-fill {
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* SVG Line Chart Style */
.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-point {
    transition: r 0.2s ease, fill 0.2s ease;
}

.chart-point:hover {
    r: 6;
    fill: #5B21B6;
}

/* Custom Toast System */
.toast-item {
    animation: toastEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastEnter {
    from {
        transform: translateY(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Custom Scrollbar for Drawer & Layout */
.custom-scroll::-webkit-scrollbar {
    width: 5px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #D1D5DB;
}

/* Active Indicator glow for main navigation links */
.nav-link.active {
    color: var(--primary);
    background-color: rgba(91, 33, 182, 0.04);
    border-left: 3px solid var(--primary);
}
.nav-link.active svg {
    color: var(--primary);
}

/* Tooltip styles */
.tooltip-trigger:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-content {
    transition: all 0.15s ease;
    transform: translateY(4px);
}

/* Premium Card & Layout Shadows/Hovers */
main > div > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main > div > div:hover {
    box-shadow: 0 10px 30px -10px rgba(91, 33, 182, 0.06), 0 1px 3px rgba(0, 0, 0, 0.01);
}

/* Focus glow enhancements for inputs & interactive fields */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1) !important;
    border-color: rgba(91, 33, 182, 0.45) !important;
}

/* Table Row interactive micro-animations */
tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
}
tbody tr:hover {
    background-color: rgba(249, 250, 251, 0.7);
}

/* Action button micro-animations */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
button:active {
    transform: scale(0.97);
}

/* Floating Navigation Pill Styles */
#floating-nav {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.nav-tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab.active {
    color: var(--primary) !important;
    background-color: rgba(91, 33, 182, 0.1) !important;
}
