/**
 * HealthLab Pro - Custom Styles
 * Extends Tailwind CSS with premium healthcare aesthetics
 */

/**
 * HealthLab Pro - Custom Styles
 * Extends Tailwind CSS with premium healthcare aesthetics
 */

/* ===== Glassmorphism Cards ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(185, 28, 28, 0.12);
}

.glass-card-dark {
    background: rgba(185, 28, 28, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Gradient Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #D4AF37 0%, #b8941e 100%);
}

.btn-accent:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* ===== Animated Gradient Background ===== */
.hero-gradient {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 50%, #EF4444 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Floating Animation ===== */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* ===== Skeleton Loader ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Global Page Loader Bar (site-wide nav loading indicator) ===== */
#page-loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: linear-gradient(90deg, #B91C1C 25%, #FCA5A5 50%, #B91C1C 75%);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#page-loader-bar.active {
    opacity: 1;
    animation: skeleton-loading 1s linear infinite, page-loader-grow 8s ease-out forwards;
}

@keyframes page-loader-grow {
    0%   { transform: scaleX(0); }
    100% { transform: scaleX(0.9); }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #FFFFFF;
    border-left: 1px solid #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #DC2626;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B91C1C;
}

/* ===== Badge Styles ===== */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

.badge-secondary {
    @apply bg-secondary/10 text-secondary-dark;
}

/* ===== Discount Badge ===== */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

/* ===== Price Strikethrough ===== */
.price-old {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.875em;
}

/* ===== Card Hover Effect ===== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(185, 28, 28, 0.15);
}

/* ===== Pulse Dot (Live indicator) ===== */
.pulse-dot {
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* ===== Form Focus Glow ===== */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===== Tooltip ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #111827;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== Mobile Responsive Adjustments ===== */
@media (max-width: 768px) {
    .hero-gradient {
        background-size: 300% 300%;
    }
}

/* ===== Print Styles (for reports) ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* ===== Loading Spinner ===== */
.spinner {
    border: 3px solid rgba(220, 38, 38, 0.1);
    border-top-color: #DC2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Status Timeline ===== */
.timeline-step {
    position: relative;
    padding-left: 40px;
}

/* ===== Pop Animation ===== */
.animate-pop {
    animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes pop {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.animate-pop-fast {
    animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

/* ===== Mobile Bottom Nav Active Icon ===== */
.mob-nav-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mob-nav-active .mob-nav-bubble {
    background: #2563EB;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
    animation: mob-nav-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transform: translateY(-3px);
}

@keyframes mob-nav-pop {
    0%   { transform: scale(0.65) translateY(0);     opacity: 0.5; }
    55%  { transform: scale(1.2)  translateY(-5px);  opacity: 1;   }
    100% { transform: scale(1.06) translateY(-3px);  opacity: 1;   }
}

.mob-nav-active .mob-nav-label {
    color: #2563EB;
    font-weight: 600;
}

.timeline-step::before {
    content: '';
    position: absolute;
    color: white;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
}
