/* ==========================================================================
   Dashboard — Card & layout
   ========================================================================== */

.card-header .title-hero__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(240, 43, 66, .2);
    color: var(--primary);
    font-size: 20px;
}

.dashboard-card {
    border-radius: 14px;
    border: 1px solid #eef0f3;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.dashboard-card .card-header {
    padding: 20px 24px !important;
    background: #ffffff;
    border-bottom: 1px solid #f1f3f5 !important;
    border-radius: 14px 14px 0 0;
}

.dashboard-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.dashboard-card .card-body {
    padding: 24px !important;
}

.card-body h3,
.card-body h5 {
    text-align: left !important;
}

.row.justify-content-center.row-cols-xxl-5 > .col {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 1399.98px) {
    .row.justify-content-center.row-cols-xxl-5 > .col {
        width: auto;
    }
}

.dashboard-create-btn {
    border-radius: 10px !important;
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 20px !important;
    height: 38px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s ease;
}

.dashboard-create-btn:hover {
    transform: translateY(-1px);
}

/* ==========================================================================
   Legacy ticket filter box (user dashboard)
   ========================================================================== */

.ticket-filter-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
}

.ticket-filter-box label {
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ticket-filter-box .select2-container--default .select2-selection--single {
    border: none !important;
    background: transparent;
    height: 28px;
    box-shadow: none !important;
}

.ticket-filter-box .select2-container--focus {
    outline: none !important;
}

.status-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 2px 4px;
    font-size: 13px;
    font-weight: 500;
}

.ticket-status-dropdown.select2-dropdown {
    border-radius: 10px;
    border-color: #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 260px !important;
    padding: 4px;
}

.ticket-status-dropdown .select2-results__option {
    padding: 4px 6px;
    border-radius: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.status-dot-all {
    background-color: #adb5bd;
}

.status-dot-new {
    background-color: #ff6f31;
}

.status-dot-reopen {
    background-color: #17d1dc;
}

.status-dot-info {
    background-color: #128af9;
}

.status-dot-warning {
    background-color: #fbc518;
}

.status-dot-closed {
    background-color: #f7284a;
}

/* ==========================================================================
   DataTables — table, search, length, pagination
   ========================================================================== */

.dashboard-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 12px;
}

.dashboard-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.dashboard-table-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.dashboard-table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dataTables_filter input {
    height: 38px;
    border-radius: 50px !important;
    border: 1px solid #e5e7eb !important;
    padding: 0 16px !important;
}

.ticket-search-box .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.ticket-search-box .dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
}

#alltickets {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    width: 100% !important;
}

#alltickets.table-bordered {
    border: 1px solid #eef0f3 !important;
}

#alltickets thead th {
    background: #f8f9fa;
    color: #4b5563;
    font-size: 12.5px;
    font-weight: 700;
    padding: 15px 18px;
    border: none !important;
    border-bottom: 1px solid #e9ecef !important;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

#alltickets tbody td {
    padding: 15px 18px;
    font-size: 13.5px;
    font-weight: 400;
    color: #374151;
    vertical-align: middle;
    border: none !important;
    border-bottom: 1px solid #f1f3f5 !important;
}

#alltickets tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#alltickets tbody tr:hover {
    background-color: #f9fafb !important;
}

#alltickets .badge {
    border-radius: 20px !important;
    padding: 5px 14px !important;
    font-weight: 600 !important;
    font-size: 11.5px !important;
}

#alltickets tbody .dataTables_empty {
    padding: 45px 16px !important;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}

#alltickets_processing {
    z-index: 10;
}

td.ticket-has-complaint {
    background-color: rgba(255, 152, 0, 0.12) !important;
}

td.ticket-has-complaint .complaint-icon {
    color: #e65100;
    font-size: 1rem;
    vertical-align: middle;
}

.dataTables_wrapper .row:last-child {
    margin-top: 20px !important;
    padding-top: 20px;
    border-top: 1px solid #f1f3f5;
}

#alltickets_paginate {
    margin-top: 0;
}

#alltickets_paginate .pagination {
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

#alltickets_paginate .page-item {
    margin: 0 !important;
}

#alltickets_paginate .page-item .page-link {
    margin: 0 !important;
    height: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    color: #374151;
    font-size: 13px;
    padding: 6px 13px;
    transition: all 0.15s ease;
    box-shadow: none !important;
}

#alltickets_paginate .page-item .page-link:hover {
    background-color: #f3f4f6;
    border-color: #ced4da !important;
    color: #1a1a1a;
}

#alltickets_paginate .page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff;
}

#alltickets_paginate .page-item.disabled .page-link {
    color: #c1c5cb;
    background-color: #fff;
    border-color: #eef0f3 !important;
    opacity: 1;
}

.dataTables_length select {
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0 10px;
    font-size: 13px;
    min-width: 60px;
}
.dataTables_length .select2-container--default .select2-selection--single {
    height: 34px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    display: flex;
    align-items: center;
    padding: 0 8px;
    min-width: 60px;
}

.dataTables_length .select2-selection__rendered {
    line-height: 34px !important;
    padding: 0 !important;
    font-size: 13px;
}

.dataTables_length .select2-selection__arrow {
    display: none !important;
}

.dataTables_length .select2-container {
    width: auto !important;
    min-width: 60px !important;
}

.dataTables_length label {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Ticket toolbar (admin)
   ========================================================================== */

.ticket-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 12px;
    background: #fafbfc;
    border: 1px solid #eef1f5;
    border-radius: 14px;
}

.ticket-toolbar-filters,
.ticket-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.ticket-toolbar-filters {
    flex: 1 1 520px;
}

.ticket-toolbar-actions {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.ticket-filter-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-width: 148px;
    flex: 1 1 148px;
    max-width: 190px;
}

.ticket-filter-field--date {
    min-width: 220px;
    max-width: 260px;
    flex: 1 1 220px;
}

.ticket-filter-label {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ticket-filter-field .form-select,
.ticket-filter-field .form-control {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #d9dee7;
    background-color: #fff;
    color: #374151;
    box-shadow: none;
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ticket-filter-field .form-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position: left 12px center, right 12px center;
    background-size: 14px, 10px;
    padding-inline-start: 32px;
    padding-inline-end: 36px;
}

.ticket-filter-field .form-select#status_selected {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M8 4a.5.5 0 0 1 .5.5v3.25l2.15 1.29a.5.5 0 1 1-.5.86l-2.4-1.44A.5.5 0 0 1 7.5 8V4.5A.5.5 0 0 1 8 4z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.ticket-filter-field .form-select#category_selected {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.ticket-filter-field .form-select#tag_selected {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.ticket-filter-field .form-select:focus,
.ticket-filter-field .form-control:focus {
    border-color: #93b4ff;
    box-shadow: 0 0 0 3px rgba(99, 140, 255, .15);
    outline: none;
}

/* Select2 — closed input matches toolbar fields */
.ticket-filter-field .select2-container {
    width: 100% !important;
}

.ticket-filter-field .select2-container--default .select2-selection--single {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #d9dee7;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: left 12px center, right 12px center;
    background-size: 14px, 10px;
    padding-inline-start: 28px;
    padding-inline-end: 28px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ticket-filter-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    color: #374151;
    font-size: 13px;
    padding: 0;
    text-align: start;
}

.ticket-filter-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

.ticket-filter-field .select2-container--default.select2-container--open .select2-selection--single,
.ticket-filter-field .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #93b4ff;
    box-shadow: 0 0 0 3px rgba(99, 140, 255, .15);
}

#status_selected + .select2-container .select2-selection--single {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M8 4a.5.5 0 0 1 .5.5v3.25l2.15 1.29a.5.5 0 1 1-.5.86l-2.4-1.44A.5.5 0 0 1 7.5 8V4.5A.5.5 0 0 1 8 4z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

#category_selected + .select2-container .select2-selection--single {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

#tag_selected + .select2-container .select2-selection--single {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.select2-container--open .select2-dropdown.ticket-filter-dropdown {
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
    margin-top: 6px;
    padding: 6px;
    background: #fff;
}

.select2-container--open .select2-dropdown.ticket-filter-dropdown.select2-dropdown--above {
    margin-top: 0;
    margin-bottom: 6px;
}

.ticket-filter-dropdown .select2-results__options {
    max-height: 240px;
}

.ticket-filter-dropdown .select2-results__option {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    text-align: start;
}

.ticket-filter-dropdown .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .ticket-filter-dropdown .select2-results__option--highlighted[aria-selected] {
    background: #f3f6fb !important;
    color: #1f2937 !important;
}

.select2-container--default .ticket-filter-dropdown .select2-results__option[aria-selected=true] {
    background: #eef4ff;
    color: #2563eb;
    font-weight: 600;
}

.select2-container--default .ticket-filter-dropdown .select2-results__option[aria-selected=true].select2-results__option--highlighted {
    background: #e8f0ff !important;
    color: #1d4ed8 !important;
}

/* Date range filter */
.date-range-wrapper {
    position: relative;
}

.date-range-wrapper .form-control {
    cursor: pointer;
    padding-inline-start: 12px;
    padding-inline-end: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
}

#date_range_panel {
    display: none;
    position: absolute;
    z-index: 9999;
    top: 100%;
    left: 0;
    width: 330px;
    margin-top: 8px;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
    background: #fff;
}

/* Complaint filter toggle */
.complaint-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: flex-end;
    min-height: 42px;
    height: 42px;
    padding: 0 14px;
    background: linear-gradient(180deg, #fff8f8 0%, #fff1f2 100%);
    border: 1px solid #ffb4bb;
    box-shadow: 0 4px 12px rgba(239, 51, 64, .12);
    border-radius: 10px;
    flex: 0 0 auto;
}

.complaint-filter-title {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    color: #b4232d;
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    white-space: nowrap;
    cursor: pointer;
}

.complaint-count {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #ef3340;
    color: #fff;
    border-radius: 20px;
    font-weight: 700;
}

.complaint-count::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: rgba(239, 51, 64, .25);
    animation: complaint-pulse 1.8s ease-out infinite;
}

.complaint-filter .switch-toggle,
.complaint-filter .onoffswitch2 {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.complaint-filter .onoffswitch2-label {
    margin: 0 !important;
}

.complaint-divider {
    width: 1px;
    height: 20px;
    border-radius: 2px;
    background: #ffd0d5;
    flex-shrink: 0;
}

@keyframes complaint-pulse {
    0% {
        transform: scale(1.2);
        opacity: .7;
    }

    70%,
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* Toolbar action buttons */
.ticket-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: flex-end;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e4e8ef;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.ticket-action-btn:hover {
    background: #f5f7fa;
    border-color: #dce2ea;
    color: #4b5563;
}

.ticket-action-btn.refresh-btn {
    padding: 0;
    width: 42px;
}

.ticket-action-btn.refresh-btn i {
    font-size: 18px;
}

.ticket-action-btn.delete-btn {
    border-color: #f3b4b8;
    background: #fff7f7;
    color: #c62828;
}

.ticket-action-btn.delete-btn:hover {
    background: #ef3340;
    border-color: #ef3340;
    color: #fff;
}

/* ==========================================================================
   Tags popover
   ========================================================================== */

.tags-popover {
    position: absolute;
    z-index: 1050;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: fit-content;
    width: auto;
}

.tags-popover-content {
    position: relative;
}

.tags-popover-body {
    padding: 10px 12px;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    white-space: nowrap;
}

.tags-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.tags-popover::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #dee2e6;
}

.tags-popover-top::before {
    top: auto;
    bottom: -6px;
    border-bottom: none;
    border-top: 6px solid white;
}

.tags-popover-top::after {
    top: auto;
    bottom: -7px;
    border-bottom: none;
    border-top: 6px solid #dee2e6;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .ticket-toolbar-actions {
        margin-inline-start: 0;
        width: 100%;
    }

    .ticket-filter-field,
    .ticket-filter-field--date {
        max-width: none;
    }
}

@media (max-width: 767px) {
    .dashboard-create-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .ticket-filter-box {
        width: 100%;
        max-width: 260px;
    }

    .ticket-filter-box .select2-container {
        max-width: 200px !important;
    }
}
