/**
 * Custom CSS
 * eBhulekh India
 */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #2D6A4F;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1B4332;
}

/* Selection Color */
::selection {
    background: #D4A574;
    color: #1E3A5F;
}

/* Focus Styles */
*:focus {
    outline: 2px solid #D4A574;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2D6A4F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skip to main content (accessibility) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 1em;
    background-color: #2D6A4F;
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
}

/* Table Styles */
table {
    border-collapse: collapse;
    width: 100%;
}

table th {
    background-color: #2D6A4F;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #F4EDE3;
}

table tr:hover {
    background-color: #FAF6F1;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748B;
}

.breadcrumb a {
    color: #2D6A4F;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Alert Boxes */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background-color: #D1FAE5;
    border-left: 4px solid #10B981;
    color: #065F46;
}

.alert-warning {
    background-color: #FEF3C7;
    border-left: 4px solid #F59E0B;
    color: #92400E;
}

.alert-error {
    background-color: #FEE2E2;
    border-left: 4px solid #EF4444;
    color: #991B1B;
}

.alert-info {
    background-color: #DBEAFE;
    border-left: 4px solid #3B82F6;
    color: #1E40AF;
}

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

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #2D6A4F 0%, #40916C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Overlay */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #1E3A5F;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Custom Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background-color: #2D6A4F;
    color: white;
}

.badge-secondary {
    background-color: #D4A574;
    color: #1E3A5F;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
    transition: all 0.3s ease;
}

/* Accessibility: Focus visible */
.focus-visible:focus {
    outline: 2px solid #D4A574;
    outline-offset: 2px;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
