﻿/* Override bootstrap */
.table {
    border-color: var(--ps-outline-variant);
}

.dropdown-menu {
    margin-top: 5px !important;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--ps-primary);
    border-color: var(--ps-primary);
}
/* Tooltip */
.tooltip.show {
    opacity: 1;
}

.tooltip .tooltip-inner {
    max-width: 320px;
    background-color: var(--ps-surface);
    border-radius: var(--ps-xs);
    border: 1px solid var(--ps-outline-variant);
    text-align: justify;
    font-family: var(--ps-font-family);
    font-size: var(--ps-label-md);
    color: var(--ps-on-surface-variant-2);
    font-weight: 400;
}

.tooltip .tooltip-arrow::before {
    border: none !important;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--ps-on-surface-variant-2) !important;
}

.breadcrumb-item {
    color: var(--ps-on-surface-variant-2) !important;
}

    .breadcrumb-item.active {
        color: var(--ps-on-surface) !important;
    }
/* Override apexchart */
.apexcharts-canvas text,
.apexcharts-canvas span,
.apexcharts-canvas div {
    font-family: var(--ps-font-family) !important;
}

.apexcharts-menu-icon, .apexcharts-reset-icon, .apexcharts-zoom-icon {
    transform: none !important;
}

    .apexcharts-menu-icon svg, .apexcharts-reset-icon svg, .apexcharts-zoom-icon svg, .apexcharts-zoomin-icon svg, .apexcharts-zoomout-icon svg {
        fill: none !important;
    }

.apexcharts-menu {
    border-radius: var(--ps-md) !important;
    border: 2px solid var(--ps-outline-variant) !important;
    padding: 0.5rem !important;
}

    .apexcharts-menu .apexcharts-menu-item {
        padding: 0.3rem;
        border-radius: var(--ps-2xs);
        text-align: center;
        white-space: nowrap;
    }

        .apexcharts-menu .apexcharts-menu-item:hover {
            background-color: var(--ps-surface-container-hover) !important;
        }

.apexcharts-gridline {
    stroke-width: 1px;
    stroke-dasharray: 3;
    stroke: var(--ps-outline-variant);
}

.apexcharts-grid-borders line:last-child {
    stroke: var(--ps-outline-variant);
    stroke-width: 1px;
}

.apexcharts-menu {
    background: var(--ps-surface-container) !important;
}

.apexcharts-tooltip {
    border-radius: unset !important;
    box-shadow: none !important;
}

    .apexcharts-tooltip.apexcharts-theme-light {
        border: none !important;
        background: none !important;
    }

    .apexcharts-tooltip .apexcharts-tooltip-series-group .apexcharts-tooltip-marker {
        width: unset;
    }

text.apexcharts-text.apexcharts-datalabel-value {
    fill: var(--ps-on-surface);
}

.apexcharts-legend-text {
    color: var(--ps-on-surface) !important;
    font-weight: 500 !important;
}

.apexcharts-yaxis-title text {
    fill: var(--ps-on-surface);
    font-weight: 600;
}

.apexcharts-yaxis-texts-g text,
.apexcharts-xaxis-texts-g text {
    font-size: var(--ps-label-md);
    fill: var(--ps-on-surface-variant-2);
}

.apexcharts-text.apexcharts-yaxis-title-text {
    font-size: var(--ps-label-md);
}

.apexcharts-title-text {
    font-size: var(--ps-body-md);
    fill: var(--ps-on-surface);
    font-weight: 600;
}

.apexcharts-subtitle-text {
    font-size: var(--ps-body-sm);
    fill: var(--ps-on-surface-variant-2);
}

.apexcharts-legend-series.apexcharts-inactive-legend .apexcharts-legend-text {
    text-decoration: line-through;
}

.apexcharts-xcrosshairs {
    stroke: var(--ps-on-surface-variant-2) !important;
    stroke-dasharray: 3 !important;
    stroke-width: 1px !important;
}
/* Override date range picker */
.daterangepicker {
    border: 2px solid var(--ps-outline-variant) !important;
    border-radius: var(--ps-md) !important;
    background-color: var(--ps-surface) !important;
    font-family: var(--ps-font-family) !important;
}

    .daterangepicker button,
    .daterangepicker li,
    .daterangepicker th,
    .daterangepicker td {
        font-size: var(--ps-body-sm);
    }

    .daterangepicker .prev.available span, .daterangepicker .next.available span {
        border: solid var(--ps-on-surface) !important;
        border-width: 0 2px 2px 0 !important;
    }

    .daterangepicker .prev.available:hover, .daterangepicker .next.available:hover {
        background-color: var(--ps-surface-container-hover) !important;
    }

    .daterangepicker .monthselect {
        outline: none;
    }

    .daterangepicker .yearselect {
        outline: none;
    }

    .daterangepicker .drp-buttons {
        border-top: none !important;
    }

    .daterangepicker .ranges li {
        font-size: var(--ps-body-sm) !important;
        height: 40px;
        display: flex;
        align-items: center;
    }

        .daterangepicker .ranges li:hover {
            background-color: var(--ps-surface-container-hover) !important;
        }

        .daterangepicker .ranges li.active {
            background-color: var(--ps-primary) !important;
        }

    .daterangepicker .calendar-table {
        background-color: var(--ps-surface) !important;
        border: none !important;
    }

        .daterangepicker .calendar-table thead tr:nth-child(2) th { /* Su Mo Tu We Th Fr Sa */
            font-weight: 500;
            color: var(--ps-on-surface-variant-2);
            padding-top: 1rem !important;
            padding-bottom: 1rem !important;
        }

    .daterangepicker td.available {
        border-radius: var(--ps-xs);
    }

        .daterangepicker td.available.start-date.active {
            background-color: var(--ps-primary) !important;
            border-radius: var(--ps-xs);
        }

        .daterangepicker td.available.end-date.active {
            background-color: var(--ps-primary) !important;
            border-radius: var(--ps-xs);
        }

    .daterangepicker th {
        font-size: var(--ps-body-sm) !important;
        padding: 0.3rem !important;
    }

    .daterangepicker th,
    .daterangepicker td {
        width: 40px !important;
        height: 40px !important;
    }

        .daterangepicker td.available {
            font-size: var(--ps-body-sm) !important;
            padding: 0.3rem !important;
            background-color: var(--ps-surface) !important;
        }

            .daterangepicker td.available:hover {
                background-color: var(--ps-surface-container-hover) !important;
            }

        .daterangepicker td.off.disabled,
        .daterangepicker td.off.available {
            color: var(--ps-on-disabled) !important;
            font-size: var(--ps-body-sm) !important;
            background-color: var(--ps-surface) !important;
            text-decoration: none !important;
            padding: 0.3rem !important;
        }

        .daterangepicker td.in-range.available {
            background-color: var(--ps-surface-container) !important;
            color: var(--ps-on-surface) !important;
        }

    .daterangepicker.show-ranges.show-calendar.opensleft:after {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.opensleft:before {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.opensleft {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.openscenter:after {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.openscenter:before {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.openscenter {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.opensright:after {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.opensright:before {
        content: none;
    }

    .daterangepicker.show-ranges.show-calendar.opensright {
        content: none;
    }

    .daterangepicker .drp-calendar {
        max-width: none !important;
    }

        .daterangepicker .drp-calendar.left {
            border-left: 1px solid var(--ps-outline-variant) !important;
            margin-right: 3rem !important;
        }

    .daterangepicker .drp-buttons {
        border-top: 1px solid var(--ps-outline-variant) !important;
    }
/* Override select2 */
.select2-dropdown {
    top: 1rem !important;
    border-radius: var(--ps-md) !important;
    background-color: var(--ps-surface) !important;
    border: 1px solid var(--ps-outline) !important;
    box-shadow: -5px 0 5px rgba(0, 0, 0, 0.2), 5px 0 5px rgba(0, 0, 0, 0.2), 0 5px 5px rgba(0, 0, 0, 0.2) !important;
}

    .select2-dropdown .select2-results__option.select2-results__option--selectable {
        background-color: var(--ps-surface) !important;
        padding: 0.8rem 3rem !important;
        background-repeat: no-repeat;
        background-size: 16px;
        background-position: left 1rem center;
    }

        .select2-dropdown .select2-results__option.select2-results__option--selectable:hover {
            background-color: var(--ps-surface-container-hover) !important;
        }

    .select2-dropdown ul li:first-child {
        border-top-left-radius: var(--ps-md) !important;
        border-top-right-radius: var(--ps-md) !important;
    }

    .select2-dropdown ul li:last-child {
        border-bottom-left-radius: var(--ps-md) !important;
        border-bottom-right-radius: var(--ps-md) !important;
    }

    .select2-dropdown ul li:first-child:hover {
        border-top-left-radius: var(--ps-md) !important;
        border-top-right-radius: var(--ps-md) !important;
    }

    .select2-dropdown ul li:last-child:hover {
        border-bottom-left-radius: var(--ps-md) !important;
        border-bottom-right-radius: var(--ps-md) !important;
    }

.select2-selection {
    background-color: var(--ps-surface) !important;
    border: 1px solid var(--ps-outline-variant) !important;
    border-radius: var(--ps-xs) !important;
    min-height: 48px !important;
}

.select2-selection__clear span {
    width: 40px !important;
    height: 40px !important;
    color: var(--ps-on-surface) !important;
}

.select2-selection__choice {
    background-color: var(--ps-surface-container) !important;
    border-radius: var(--ps-md) !important;
    height: var(--ps-btn-icon-height) !important;
    padding: 0.3rem 2rem 0.3rem 1rem !important;
    border: none !important;
    margin: 0.5rem 0px 0px 0.5rem !important;
}

    .select2-selection__choice .select2-selection__choice__remove {
        border-right: none !important;
        color: var(--ps-on-surface) !important;
        right: 5px !important;
        top: -8px !important;
        left: unset !important;
    }

        .select2-selection__choice .select2-selection__choice__remove span {
            font-size: 30px;
            font-weight: lighter;
        }

        .select2-selection__choice .select2-selection__choice__remove:hover {
            background-color: var(--ps-surface-container) !important;
        }

.select2-container--default .select2-selection--multiple .select2-selection__clear {
    height: unset !important;
    margin: 0px !important;
    padding: 0px !important;
    right: 10px !important;
    top: 50% !important;
    transform: translate(0%, -50%) !important;
    font-weight: lighter !important;
    font-size: 20px !important;
}

.select2-search.select2-search--inline {
    position: absolute !important;
    top: 50% !important;
    transform: translate(0%, -50%) !important;
}

    .select2-search.select2-search--inline textarea {
        margin-top: 0 !important;
        margin-left: 0.8rem !important;
    }

.select2-selection--multiple:has(.select2-selection__choice) .select2-search--inline {
    display: none !important;
}

.select2-selection--multiple:has(.select2-selection__choice) .select2-search__field {
    display: none !important;
}

.select2-selection--multiple:before {
    content: "";
    position: absolute;
    right: 7px;
    top: 50%;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    transition: transform 0.2s ease;
    pointer-events: none;
    transform: translateY(-50%);
}

.select2-selection--multiple:has(.select2-selection__choice):before {
    display: none;
}

.select2-selection--multiple.has-selections:before {
    display: none;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 300px !important;
}

.select2-search__field {
    color: var(--ps-on-surface-variant-2);
}

    .select2-search__field::placeholder {
        color: var(--ps-on-surface-variant-2);
    }

.select2-results__option.select2-results__message {
    color: var(--ps-on-surface-variant-2);
}

.select2-wrapper {
    position: relative;
    min-height: 48px;
}

.select2-option-title {
    font-weight: 600;
}

.select2-option-description {
    font-size: var(--ps-label-md);
    color: var(--ps-on-surface-variant-2);
}


/* Override ion range slider */
.irs--big .irs-line {
    height: 6px;
}

.irs--big .irs-bar {
    height: 6px;
    border: none;
    box-shadow: none;
    background: var(--ps-primary-container);
}

.irs--big .irs-handle {
    width: 12px;
    height: 12px;
    top: 30px;
    box-shadow: none;
    border: 2px solid var(--ps-primary-container);
    border-radius: 50%;
    background: #fff;
}

    .irs--big .irs-handle.state_hover, .irs--big .irs-handle:hover {
        background: var(--ps-primary-container);
        border-color: var(--ps-primary-container);
    }

.irs--big .irs-min, .irs--big .irs-max {
    display: none;
}

.irs--big .irs-from, .irs--big .irs-to, .irs--big .irs-single {
    color: var(--ps-on-surface);
    top: 8px;
    background-color: none;
    background: none;
    border: none;
}
