/* PAR - Pharmacy Admin & Retail System */
/* Custom Styles & Animations */

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

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

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

.animate-slide-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ========== Card Hover Effects ========== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

/* ========== Button Effects ========== */
.btn-effect {
    transition: all 0.2s ease;
}

.btn-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-effect:active {
    transform: translateY(0);
}

/* ========== Gradient Backgrounds ========== */
.gradient-primary {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

/* ========== Sidebar Styles ========== */
.sidebar-link {
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #10b981;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
    transform: scaleY(1);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(16, 185, 129, 0.1);
}

/* ========== Input Focus Effects ========== */
.input-focus {
    transition: all 0.2s ease;
}

.input-focus:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* ========== Table Styles ========== */
.table-row-hover {
    transition: background-color 0.2s ease;
}

.table-row-hover:hover {
    background-color: #f0fdf4;
}

/* ========== Badge Pulse ========== */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    animation: pulse-slow 2s infinite;
    background: inherit;
    z-index: -1;
}

/* ========== Loading Spinner ========== */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

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

/* ========== Toast Notifications ========== */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast-exit {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    to { opacity: 0; transform: translateX(100%); }
}

/* ========== Pharmacy Specific ========== */
.medicine-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.medicine-card:hover {
    border-color: #10b981;
    transform: scale(1.02);
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.stock-high { background-color: #10b981; }
.stock-medium { background-color: #f59e0b; }
.stock-low { background-color: #ef4444; }

/* ========== Print Styles ========== */
@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white !important;
    }

    .sidebar, .navbar {
        display: none !important;
    }
}

/* ========== Responsive Helpers ========== */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }

    .mobile-full {
        width: 100% !important;
    }
}

/* ========== Glass Effect ========== */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ========== Skeleton Loading ========== */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #d1d5db 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
