/* TGGCM Console - Minimal Custom Styles for Tailwind Integration */

/* Legacy cleanup and utility styles for modern HTML5 elements */

/* Стили для HTML5 date полей */
input[type="date"] {
    color-scheme: dark !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgb(203, 213, 225) !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
    cursor: pointer !important;
    background-color: transparent !important;
}

input[type="date"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgb(59 130 246) !important;
    border-color: transparent !important;
}

.month-prev, .month-next {
    color: #e2e8f0 !important;
}

/* Modal overlay styling */
.modal-overlay {
    position: fixed !important;
    z-index: 1002 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    display: none !important;
}

.modal-overlay.active {
    display: block !important;
    opacity: 1 !important;
}

/* Toast notifications */
.toast {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 0.75rem !important;
}

/* Select dropdown styling */
.dropdown-content {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.5rem !important;
}

.dropdown-content li > a, .dropdown-content li > span {
    color: #e2e8f0 !important;
    padding: 12px 16px !important;
}

.dropdown-content li:hover > a, .dropdown-content li:hover > span {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

/* Checkbox and radio styling */
[type="checkbox"]:checked + span:not(.lever):before {
    border-color: transparent #3b82f6 #3b82f6 transparent !important;
}

[type="checkbox"] + span:not(.lever):before {
    border: 2px solid #64748b !important;
}

[type="checkbox"] + span:not(.lever),
[type="radio"] + span:not(.lever) {
    color: #e2e8f0 !important;
}

[type="radio"]:checked + span:after {
    background-color: #3b82f6 !important;
}

[type="radio"] + span:not(.lever):before {
    border: 2px solid #64748b !important;
}

/* Pagination styling */
.pagination li.active {
    background-color: #3b82f6 !important;
}

.pagination li a {
    color: #e2e8f0 !important;
}

.pagination li a:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Tab styling */
.tabs .tab a {
    color: #94a3b8 !important;
}

.tabs .tab a:hover, .tabs .tab a.active {
    color: #3b82f6 !important;
}

.tabs .indicator {
    background-color: #3b82f6 !important;
}

/* Collection items */
.collection .collection-item {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

.collection .collection-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Preloader spinner */
.preloader-wrapper .spinner-layer {
    border-color: #3b82f6 !important;
}

/* Sidenav styling */
.sidenav {
    background-color: #1e293b !important;
}

.sidenav li > a {
    color: #e2e8f0 !important;
}

.sidenav li > a:hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Utility classes for table filtering and sorting */
.filterable-cell {
    cursor: pointer !important;
    transition: background-color 0.2s, color 0.2s !important;
}

.filterable-cell:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
}

.filterable-cell.active-filter {
    background-color: #3b82f6 !important;
    color: white !important;
    font-weight: bold !important;
}

.sortable-header {
    cursor: pointer !important;
    position: relative !important;
    user-select: none !important;
    transition: background-color 0.2s !important;
}

.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.sortable-header::after {
    content: '' !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0.3 !important;
}

.sortable-header[data-sort="asc"]::after {
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-bottom: 6px solid #e2e8f0 !important;
    opacity: 1 !important;
}

.sortable-header[data-sort="desc"]::after {
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 6px solid #e2e8f0 !important;
    opacity: 1 !important;
}

/* Mobile multi-select mode */
.pending-selection {
    background-color: #1a237e !important;
    border: 2px solid #3f51b5 !important;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.3) !important;
}

.mobile-selected {
    background-color: #1b5e20 !important;
    border: 2px solid #4caf50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3) !important;
}

/* Action buttons hover effect */
.action-buttons {
    opacity: 0;
    transition: opacity 0.3s;
}

tr:hover .action-buttons {
    opacity: 1;
}

/* Fixed action button */
.fixed-action-btn .btn-floating {
    width: 56px !important;
    height: 56px !important;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.25) !important;
}

.fixed-action-btn .btn-floating:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.3) !important;
}

/* Chart.js dark theme text color override */
.chart-container * {
    color: #e2e8f0 !important;
}

/* Filter chips styling */
.filter-chip {
    display: inline-flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    gap: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.filter-chip:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.filter-chip .close-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin-left: 4px !important;
}

.filter-chip .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}