/* UI Improvements & Consolidated Styles */

/* Styles moved from base.html */
.series-tip {
    position: fixed;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    line-height: 1.6;
    max-width: 260px;
    width: max-content;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(calc(-100% - 8px));
    transition: opacity 0.12s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.series-tip.visible   { opacity: 1; }
.series-tip.tip-below { transform: translateX(-50%); }
.series-tip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.88);
    border-bottom: none;
}
.series-tip.tip-below::after {
    bottom: auto;
    top: -6px;
    border-top-color: transparent;
    border-bottom: 6px solid rgba(0,0,0,0.88);
}
.series-tip .tip-row { display: flex; gap: 6px; }
.series-tip .tip-lbl { font-weight: 700; color: #adb5bd; flex-shrink: 0; min-width: 38px; }
.theme-swatch {
    display: inline-block;
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(128,128,128,0.3);
    flex-shrink: 0;
    margin-right: 6px;
}
/* Global price cell — Roboto Mono, tabular figures */
.pc {
    font-family: 'Roboto Mono', 'SFMono-Regular', monospace;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
/* Compact override for dense result tables */
.batch-results-table .pc { font-size: 0.76rem; }
/* Unified card header */
.result-card-header {
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.result-card-header h6 {
    margin-bottom: 0;
    font-weight: 700;
}

/* New Improvements */

/* Vibrant Mesh Gradient */
.vibrant-mesh-bg {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: vibrant-mesh 15s ease infinite;
}

/* Sticky Table Headers */
.table-responsive {
    max-height: 65vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bs-table-bg, var(--bs-body-bg));
    box-shadow: inset 0 -1px 0 var(--bs-border-color, #dee2e6);
}
.table-light th {
    background-color: var(--bs-table-bg, #f8f9fa) !important;
}
[data-bs-theme="dark"] .table-light th {
    background-color: var(--bs-gray-800, #343a40) !important;
    color: var(--bs-gray-300, #dee2e6) !important;
}

@keyframes vibrant-mesh {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    z-index: 1;
    pointer-events: none;
}
.btn-shine:hover::after {
    left: 100%;
    top: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .vibrant-mesh-bg {
        animation: none;
        background: linear-gradient(135deg, #23a6d5, #23d5ab);
    }
    .btn-shine::after,
    .btn-shine:hover::after {
        transition: none;
    }
}

/* --- Premium Animations & Hover Lifts --- */

/* Globally enable smooth theme transitions for a premium feel */
* {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.15s ease;
}

/* Premium Card Hover Lift */
.card-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                border-color 0.3s ease !important;
}
.card-lift:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 
                0 4px 8px rgba(0, 0, 0, 0.04) !important;
    border-color: var(--bs-primary, #4285F4) !important;
}

/* Fade-In and Scale-In animation classes */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.animate-scale-in {
    animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Micro-interaction for form selects and inputs */
.form-select, .form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.form-select:focus, .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.15);
    transform: scale(1.002);
}

/* Micro-animations for buttons on click */
.btn:active {
    transform: scale(0.97);
}
.btn {
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

