/*
 * Santosh Diagnostics (SD) Entity-Specific Styles
 * Extracted from SD HTML pages with pixel-perfect accuracy
 */

/* Entity-Specific Color Variables */
:root {
    --sd-primary: #ed1823;
    --sd-secondary: #3b82f6;
    --sd-accent: #b91c1c;
    --sd-emergency: #ed1823;
}

/* Glass Morphism Effects - SD Specific */
.entity-sd .glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(237, 24, 35, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.entity-sd .glass-card:hover {
    border-color: #ed1823;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 25px -5px rgba(237, 24, 35, 0.1), 0 10px 10px -5px rgba(237, 24, 35, 0.04), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px) scale(1.02);
}

/* Hero Background - SD Specific */
.entity-sd .hero-bg {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
}

/* Test Categories Carousel Layout */
.entity-sd .test-categories-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.entity-sd .carousel-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.entity-sd .carousel-slide {
    flex: 0 0 calc(100% / 3); /* Show 3 cards on desktop */
    width: calc(100% / 3);
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0 0.75rem; /* Reduced padding for tighter spacing */
}

.entity-sd .carousel-slide > a {
    width: 100%;
    max-width: 320px; /* Reduced max-width for more compact cards */
    display: block;
    position: relative;
}

.entity-sd .carousel-slide .glass-card {
    height: 100%;
    min-height: 240px; /* Reduced min-height for more compact cards */
    max-height: 240px; /* Fixed max-height to ensure uniform sizing */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    width: 100%;
    overflow: hidden; /* Prevent content from stretching the card */
}

.entity-sd .carousel-slide .glass-card p {
    flex: 1; /* Allow description to take available space */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

/* Carousel Navigation Arrows - SD Specific */
.entity-sd .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ed1823;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(237, 24, 35, 0.3);
}

.entity-sd .carousel-nav:hover {
    background: #b91c1c;
    transform: translateY(-50%) scale(1.1);
}

.entity-sd .carousel-nav.prev {
    left: -25px;
}

.entity-sd .carousel-nav.next {
    right: -25px;
}

/* Dropdown positioning - prevent layout interference */
.entity-sd .test-categories-carousel [id$="-dropdown"] {
    position: fixed !important;
    z-index: 1000 !important;
    width: 300px !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Test Card Styles */
.entity-sd .test-card {
    transition: all 0.3s ease;
    border: 2px solid rgba(237, 24, 35, 0.1);
}

.entity-sd .test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(237, 24, 35, 0.1);
    border-color: #ed1823;
}

/* Button Styles - SD Specific */
.entity-sd .btn-primary {
    background-color: #ed1823;
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.entity-sd .btn-primary:hover {
    background-color: #b91c1c;
    transform: scale(1.05);
}

.entity-sd .btn-secondary {
    border: 2px solid #ed1823;
    color: #ed1823;
    background: transparent;
    transition: all 0.2s ease;
}

.entity-sd .btn-secondary:hover {
    background-color: #ed1823;
    color: white;
}

/* Navigation Link Colors - SD Specific */
.entity-sd .nav-link:hover,
.entity-sd .nav-link.active {
    color: #ed1823;
}

/* Time Slot Selection - SD Specific */
.entity-sd .time-slot.selected {
    background-color: #ed1823;
    border-color: #ed1823;
    color: white;
}

/* Price Range Slider - SD Specific */
.entity-sd .price-range-slider {
    background: linear-gradient(to right, #ed1823 0%, #ed1823 50%, #e5e7eb 50%, #e5e7eb 100%);
}

/* Filter and Category Styles */
.entity-sd .category-filter.active {
    background-color: #ed1823;
    color: white;
}

.entity-sd .test-category-badge {
    background-color: rgba(237, 24, 35, 0.1);
    color: #ed1823;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .entity-sd .carousel-slide {
        flex: 0 0 50%; /* Show 2 cards on tablet */
        width: 50%;
    }
}

@media (max-width: 768px) {
    .entity-sd .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .entity-sd .carousel-nav i {
        font-size: 1.2rem;
    }
    
    .entity-sd .carousel-slide {
        flex: 0 0 100%; /* Show 1 card on mobile */
        width: 100%;
        padding: 0 1rem;
    }
    
    .entity-sd .carousel-slide > a {
        max-width: 400px; /* Restore larger max-width on mobile */
    }
    
    .entity-sd .carousel-slide .glass-card {
        min-height: 280px; /* Restore larger min-height on mobile */
        max-height: none; /* Remove max-height restriction on mobile */
    }
}

/* Loading States */
.entity-sd .loading-spinner {
    border-color: #ed1823;
}

/* Form Styles */
.entity-sd .form-input:focus {
    border-color: #ed1823;
    box-shadow: 0 0 0 3px rgba(237, 24, 35, 0.1);
}

.entity-sd .form-select:focus {
    border-color: #ed1823;
    box-shadow: 0 0 0 3px rgba(237, 24, 35, 0.1);
}

/* Alert Styles */
.entity-sd .alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #15803d;
}

.entity-sd .alert-error {
    background-color: rgba(237, 24, 35, 0.1);
    border-color: #ed1823;
    color: #b91c1c;
}

/* Progress Bar */
.entity-sd .progress-bar {
    background-color: #ed1823;
}

/* Tooltip Styles */
.entity-sd .tooltip {
    background-color: #ed1823;
    color: white;
}

.entity-sd .tooltip::after {
    border-top-color: #ed1823;
}

/* Modal Styles */
.entity-sd .modal-header {
    border-bottom-color: rgba(237, 24, 35, 0.1);
}

.entity-sd .modal-footer {
    border-top-color: rgba(237, 24, 35, 0.1);
}

/* Tab Styles */
.entity-sd .tab-active {
    border-bottom-color: #ed1823;
    color: #ed1823;
}

/* Badge Styles */
.entity-sd .badge-primary {
    background-color: #ed1823;
    color: white;
}

.entity-sd .badge-secondary {
    background-color: #3b82f6;
    color: white;
}

/* Link Styles */
.entity-sd a:not(.btn):hover {
    color: #ed1823;
}

/* Icon Colors */
.entity-sd .icon-primary {
    color: #ed1823;
}

.entity-sd .icon-secondary {
    color: #3b82f6;
}

/* Divider Styles */
.entity-sd .divider {
    border-color: rgba(237, 24, 35, 0.2);
}

/* Checkbox and Radio Styles */
.entity-sd .checkbox:checked {
    background-color: #ed1823;
    border-color: #ed1823;
}

.entity-sd .radio:checked {
    background-color: #ed1823;
    border-color: #ed1823;
}

/* Pagination Styles */
.entity-sd .pagination .active {
    background-color: #ed1823;
    border-color: #ed1823;
    color: white;
}

.entity-sd .pagination a:hover {
    background-color: rgba(237, 24, 35, 0.1);
    border-color: #ed1823;
    color: #ed1823;
}