/* Custom Filament Admin Theme
   This file contains custom CSS overrides for the Filament admin panel.
   The styles target specific Filament component classes and heroicon elements. */

/* Relation Manager Tab Styling - Colored backgrounds */
.fi-tabs-item {
    transition: all 0.2s ease;
}

/* Prescriptions tab - Green */
.fi-tabs-item:has([class*="heroicon-o-document-text"]) button {
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-document-text"]) button:hover {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-document-text"]) button[aria-selected="true"] {
    background-color: rgba(34, 197, 94, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(34, 197, 94);
}

/* Lab Requests tab - Yellow/Amber */
.fi-tabs-item:has([class*="heroicon-o-beaker"]) button {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-beaker"]) button:hover {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-beaker"]) button[aria-selected="true"] {
    background-color: rgba(245, 158, 11, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(245, 158, 11);
}

/* Lab Results tab - Blue */
.fi-tabs-item:has([class*="heroicon-o-clipboard-document-check"]) button {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-clipboard-document-check"]) button:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-clipboard-document-check"]) button[aria-selected="true"] {
    background-color: rgba(59, 130, 246, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(59, 130, 246);
}

/* Medical Certificates tab - Purple */
.fi-tabs-item:has([class*="heroicon-o-document-check"]):not(:has([class*="heroicon-o-clipboard-document-check"])) button {
    background-color: rgba(139, 92, 246, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-document-check"]):not(:has([class*="heroicon-o-clipboard-document-check"])) button:hover {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-document-check"]):not(:has([class*="heroicon-o-clipboard-document-check"])) button[aria-selected="true"] {
    background-color: rgba(139, 92, 246, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(139, 92, 246);
}

/* Admission Orders tab - Red */
.fi-tabs-item:has([class*="heroicon-o-building-office-2"]) button {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-building-office-2"]) button:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-building-office-2"]) button[aria-selected="true"] {
    background-color: rgba(239, 68, 68, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(239, 68, 68);
}

/* Referrals tab - Gray */
.fi-tabs-item:has([class*="heroicon-o-arrow-top-right-on-square"]) button {
    background-color: rgba(107, 114, 128, 0.1) !important;
    border-radius: 0.5rem;
}

.fi-tabs-item:has([class*="heroicon-o-arrow-top-right-on-square"]) button:hover {
    background-color: rgba(107, 114, 128, 0.2) !important;
}

.fi-tabs-item:has([class*="heroicon-o-arrow-top-right-on-square"]) button[aria-selected="true"] {
    background-color: rgba(107, 114, 128, 0.25) !important;
    box-shadow: inset 0 -2px 0 rgb(107, 114, 128);
}

/* ========================================
   Consultation Status Tabs Styling
   Uses data-status attributes added via extraAttributes in ListConsultations.php
   ======================================== */

/* Waiting tab - Blue */
.fi-tabs-item[data-status="waiting"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.15)) !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.fi-tabs-item[data-status="waiting"]:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.25)) !important;
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.fi-tabs-item[data-status="waiting"][aria-selected="true"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.3)) !important;
    box-shadow: inset 0 -3px 0 rgb(59, 130, 246), 0 2px 8px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

/* In Progress tab - Amber/Orange */
.fi-tabs-item[data-status="in_progress"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.15)) !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.2s ease;
}

.fi-tabs-item[data-status="in_progress"]:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25)) !important;
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

.fi-tabs-item[data-status="in_progress"][aria-selected="true"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.3)) !important;
    box-shadow: inset 0 -3px 0 rgb(245, 158, 11), 0 2px 8px rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Completed tab - Green */
.fi-tabs-item[data-status="completed"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.15)) !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(34, 197, 94, 0.2);
    transition: all 0.2s ease;
}

.fi-tabs-item[data-status="completed"]:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25)) !important;
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.fi-tabs-item[data-status="completed"][aria-selected="true"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.3)) !important;
    box-shadow: inset 0 -3px 0 rgb(34, 197, 94), 0 2px 8px rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

/* All Consultations tab - Gray */
.fi-tabs-item[data-status="all"] {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.06), rgba(107, 114, 128, 0.12)) !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(107, 114, 128, 0.15);
    transition: all 0.2s ease;
}

.fi-tabs-item[data-status="all"]:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.12), rgba(107, 114, 128, 0.2)) !important;
    border-color: rgba(107, 114, 128, 0.3);
    transform: translateY(-1px);
}

.fi-tabs-item[data-status="all"][aria-selected="true"] {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.25)) !important;
    box-shadow: inset 0 -3px 0 rgb(107, 114, 128), 0 2px 8px rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.35);
}

/* Doctor tabs - Indigo/Purple */
.fi-tabs-item[data-status="doctor"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.15)) !important;
    border-radius: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.fi-tabs-item[data-status="doctor"]:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.25)) !important;
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.fi-tabs-item[data-status="doctor"][aria-selected="true"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.3)) !important;
    box-shadow: inset 0 -3px 0 rgb(99, 102, 241), 0 2px 8px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Dark Mode Adjustments */
.dark .fi-tabs-item[data-status="waiting"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.25)) !important;
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .fi-tabs-item[data-status="in_progress"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25)) !important;
    border-color: rgba(245, 158, 11, 0.3);
}

.dark .fi-tabs-item[data-status="completed"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25)) !important;
    border-color: rgba(34, 197, 94, 0.3);
}

.dark .fi-tabs-item[data-status="all"] {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.12), rgba(107, 114, 128, 0.2)) !important;
    border-color: rgba(107, 114, 128, 0.25);
}

.dark .fi-tabs-item[data-status="doctor"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.25)) !important;
    border-color: rgba(99, 102, 241, 0.3);
}

/* ========================================
   Stats Widget - Remove colored top border
   ======================================== */
.fi-wi-stats-overview-stat-no-border::before {
    display: none !important;
}

.fi-wi-stats-overview-stat-no-border {
    border-top: none !important;
}

/* ========================================
   Chart Widgets - Remove colored top border
   ======================================== */
.fi-wi-chart::before {
    display: none !important;
}

.fi-wi-chart {
    border-top: none !important;
}

/* Remove border from all section widgets */
.fi-section::before {
    display: none !important;
}

/* ========================================
   Remove ALL colored top borders from widgets
   ======================================== */
[class*="fi-wi"]::before,
[class*="fi-section"]::before,
[class*="fi-card"]::before {
    display: none !important;
}

[class*="fi-wi"],
[class*="fi-section"],
[class*="fi-card"] {
    border-top-color: transparent !important;
}

/* Stats Widget - Clean styling */
/* Remove any colored borders but keep charts visible */
[class*="fi-wi-stats-overview-stat"] {
    overflow: visible !important;
}

/* ========================================
   Table Header - Styling
   ======================================== */
/* 
   NOTE: Previously had flex-direction: row-reverse which was 
   causing all relation manager titles to shift to the right.
   Removed to restore default layout.
*/

/* ========================================
   Compact Table Rows
   ======================================== */
/* Reduce padding in table rows for more compact display */
.fi-ta-row {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    min-height: auto !important;
}

/* Reduce padding in table row content wrapper */
.fi-ta-row>div {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Reduce spacing in Split layout columns */
.fi-ta-col-wrp {
    padding-top: 0.125rem !important;
    padding-bottom: 0.125rem !important;
}

/* Compact the actions column */
.fi-ta-actions {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Reduce gap between items in split */
.fi-ta-col-wrp .gap-y-1 {
    gap: 0.125rem !important;
}