/* ==========================================
   SHARED COMPONENTS
   Reusable UI components across the application
   ========================================== */

/* ==========================================
   STATS COMPONENTS
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-white);
    margin-bottom: 15px;
}

.stat-icon.orders { background: var(--gradient-stats-purple); }
.stat-icon.users { background: var(--gradient-stats-pink); }
.stat-icon.revenue { background: var(--gradient-stats-blue); }
.stat-icon.tests { background: var(--gradient-stats-green); }

.stat-number {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-gray);
    font-size: var(--font-size-base);
    margin-bottom: 10px;
}

/* ==========================================
   CARD COMPONENTS
   ========================================== */
.package-card,
.product-card,
.test-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.package-card:hover,
.product-card:hover,
.test-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Feature Card */
.feature-card {
    background: #e8f0fe;
    padding: 25px 20px;
    border-radius: var(--radius-xl);
    text-align: left;
    height: 120px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: #e8f0fe;
    border: 2px solid #4285f4;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon img {
    width: 30px;
    height: 30px;
}

.feature-title {
    color: #1565c0;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    line-height: 1.3;
    margin: 0;
}

/* ==========================================
   BADGE COMPONENTS
   ========================================== */
.badge,
.status-badge,
.discount-badge,
.sale-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Discount Badge */
.discount-badge {
    background: var(--primary-orange);
    color: var(--text-dark);
}

/* Sale Badge - For Product Cards Only */
.sale-badge-new {
    background: #febd69 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 10 !important;
    text-transform: capitalize !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 0.3px !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

/* Navigation SALE badge - Inline, no absolute positioning */
.categories-dropdown-trigger .sale_badge,
.nav-link-new .sale_badge {
    background: #199588 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 10px !important;
    position: relative !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    text-transform: uppercase !important;
}

/* Status Badges */
.status-pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.status-confirmed {
    background: linear-gradient(135deg, #cce7ff, #74b9ff);
    color: #004085;
}

.status-sample_collected {
    background: linear-gradient(135deg, #e7e3ff, #a29bfe);
    color: #5f27cd;
}

.status-report_ready {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    color: #6d28d9;
}

.status-completed {
    background: linear-gradient(135deg, #d1ecf1, #55efc4);
    color: #0c5460;
}

.status-cancelled {
    background: linear-gradient(135deg, #f8d7da, #fd79a8);
    color: #721c24;
}

/* Default Badge */
.default-badge {
    background: var(--gradient-success);
    color: var(--text-white);
}

/* ==========================================
   ACCORDION COMPONENTS
   ========================================== */
.accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-light);
}

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

.accordion-button {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    padding: 18px 25px;
    border: none;
}

.accordion-button:not(.collapsed) {
    background: lightslategray;
    color: var(--text-white);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 25px;
    background-color: var(--bg-white);
    color: var(--primary-blue);
    border-top: 1px solid var(--primary-blue);
}

/* ==========================================
   SLIDER/CAROUSEL COMPONENTS
   Professional Orange Arrows
   ========================================== */
.slider-arrow,
.slider-arrow-left,
.slider-arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    border: none;
    border-radius: var(--radius-round);
    color: var(--text-white);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(254, 189, 105, 0.3);
}

.slider-arrow:hover,
.slider-arrow-left:hover,
.slider-arrow-right:hover {
    background: #ff9800 !important; /* Bright orange on hover */
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.6);
    color: #ffffff;
}

.slider-arrow:active,
.slider-arrow-left:active,
.slider-arrow-right:active {
    background: #e68900 !important; /* Darker orange on tap/click */
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 3px 10px rgba(230, 137, 0, 0.6);
}

.slider-arrow-left {
    left: -25px;
}

.slider-arrow-right {
    right: -25px;
}

/* Disabled State */
.slider-arrow:disabled,
.slider-arrow-left:disabled,
.slider-arrow-right:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.slider-arrow:disabled:hover,
.slider-arrow-left:disabled:hover,
.slider-arrow-right:disabled:hover {
    transform: translateY(-50%) scale(1);
}

/* Carousel Navigation (Hero Slider) */
.carousel-nav-prev,
.carousel-nav-next {
    width: 50px;
    height: 50px;
    background: rgba(254, 189, 105, 0.95);
    border: none;
    border-radius: var(--radius-round);
    color: var(--text-white);
    font-size: 18px;
    cursor: pointer;
    pointer-events: all;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(254, 189, 105, 0.3);
}

.carousel-nav-prev:hover,
.carousel-nav-next:hover {
    background: var(--primary-orange);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(254, 189, 105, 0.5);
}

/* ==========================================
   MODAL COMPONENTS
   ========================================== */
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-modal,
.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.close-modal:hover,
.btn-close:hover {
    color: var(--text-dark);
}

/* ==========================================
   EMPTY STATE COMPONENTS
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    font-weight: var(--font-weight-bold);
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* ==========================================
   LOADING COMPONENTS
   ========================================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 11px;
    }

    .feature-card {
        padding: 10px;
        height: auto;
    }

    .feature-icon {
        width: 35px;
        height: 35px;
    }

    .feature-title {
        font-size: 13px !important;
    }

    .slider-arrow,
    .slider-arrow-left,
    .slider-arrow-right {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .slider-arrow-left {
        left: 10px;
    }

    .slider-arrow-right {
        right: 10px;
    }

    .carousel-nav-prev,
    .carousel-nav-next {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .feature-icon {
        width: 30px;
        height: 30px;
    }

    .feature-title {
        font-size: 11px !important;
    }

    .slider-arrow,
    .slider-arrow-left,
    .slider-arrow-right {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .slider-arrow-left {
        left: 5px;
    }

    .slider-arrow-right {
        right: 5px;
    }

    .carousel-nav-prev,
    .carousel-nav-next {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}
