/* Search Dropdown Styles - Fixed positioning BELOW the input */
.lab-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 0 2px 0 rgba(60, 64, 67, 0.30), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    border-radius: 4px;
    z-index: 1055;
    max-height: 400px;
    overflow: hidden;
    display: none;
}

.lab-search-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lab-search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.lab-search-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.lab-search-item-content {
    flex: 1;
    min-width: 0;
}

.lab-search-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.3;
}

.lab-search-item-price-details {
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lab-search-item-current-price {
    font-weight: 700;
    color: #0F93FE;
    font-size: 14px;
}

.lab-search-item-original-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #95a5a6;
}

.lab-search-item-discount {
    color: #0F93FE;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #0F93FE;
}

.lab-search-item-description {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.lab-search-item:hover,
.lab-search-item.active {
    background: linear-gradient(135deg, #f8f9fd 0%, #e8f4f8 100%);
}

.lab-search-item:last-child {
    border-bottom: none;
}

.lab-search-item-add-btn {
    background: #0F93FE !important;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.lab-search-item-add-btn:hover {
    background: #0d7cd4;
    transform: translateY(-1px);
}

/* Exact Match Indicator */
.lab-search-item.exact-match {
    background: #f0f8ff;
    border-left: 4px solid #28a745;
}

.lab-search-item.exact-match {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #28a745;
}

.lab-search-item.exact-match::before {
    content: "✓ Exact Match";
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 10px;
    color: #28a745;
    font-weight: 600;
}

.lab-search-empty {
    padding: 40px 20px;
    text-align: center;
    color: #7f8c8d;
}

.lab-search-empty i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 16px;
    display: block;
}

/* Loading State */
.lab-search-loading {
    padding: 30px 20px;
    text-align: center;
    color: #7f8c8d;
}

.lab-search-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0F93FE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar for dropdown */
.lab-search-results::-webkit-scrollbar {
    width: 6px;
}

.lab-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.lab-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.lab-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lab-search-container {
        width: 100%;
    }

    .lab-search-input {
        font-size: 12px;
        /* Prevents zoom on iOS */
    }

    .lab-search-dropdown {
        max-height: 300px;
        border-radius: 8px;
    }

    .lab-search-item {
        padding: 12px 16px;
        gap: 12px;
    }
}



/* ===== SKELETON LOADING STYLES ===== */
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.skeleton-card-body {
    padding: 20px;
    flex: 1;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

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

.skeleton-badge {
    width: 80px;
    height: 24px;
    margin-bottom: 12px;
    border-radius: 12px;
}

.skeleton-title {
    width: 70%;
    height: 18px;
    margin-bottom: 12px;
}

.skeleton-text {
    width: 100%;
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-text-medium {
    width: 85%;
    height: 12px;
    margin-bottom: 12px;
}

.skeleton-text-short {
    width: 60%;
    height: 12px;
    margin-bottom: 16px;
}

.skeleton-price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.skeleton-price {
    width: 80px;
    height: 24px;
}

.skeleton-discount {
    width: 60px;
    height: 20px;
    border-radius: 4px;
}

.skeleton-button {
    width: 100%;
    height: 48px;
    border-radius: 0 0 12px 12px;
    margin-top: auto;
}

/* Ensure skeleton cards display properly in grid */
#loading-placeholder.row {
    display: flex !important;
    flex-wrap: wrap;
}

.read-more-text{
    color: #0F93FE;
}