/* =========================================================
   THEME: Underline Inputs + No Radius (ALL controls)
   No color changes, only shape + underline.
========================================================= */

body {
    font-family: "Poppins", sans-serif;
}

/* ---------- Remove border radius globally on controls ---------- */
.btn,
.btn-group .btn,
.nav-pills .nav-link,
.nav-tabs .nav-link,
.pagination .page-link,
.badge,
.alert,
.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.toast,
.progress,
.form-select,
.form-control,
.input-group-text,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0 !important;
}

/* ---------- Inputs = underline-only ---------- */
input.form-control,
textarea.form-control,
select.form-control,
.form-select {
    border: none !important;
    border-bottom: 2px solid #ccc !important; /* underline */
    background: transparent !important;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none !important;
    transition: border-color 0.25s ease;
}

/* Use a consistent dropdown indicator on single selects (avoid OS-native arrow misalignment) */
select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='currentColor' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    background-size: 8px 10px;
    padding-right: 1.5rem !important;
}

/* Focus state: underline highlight only */
input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus,
.form-select:focus {
    border-bottom: 2px solid currentColor !important; /* highlight underline using text color */
    outline: 0 !important;
    box-shadow: none !important;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

/* ---------- Select2 (underline variant) ---------- */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: none !important;
    border-bottom: 2px solid #ccc !important;
    border-radius: 0 !important;
    background: transparent !important;
    min-height: 2.5rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-shadow: none !important;
    transition: border-color 0.25s ease;
    display: flex;
    align-items: center;
    gap: .25rem;
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    color: inherit;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus
    .select2-selection--multiple,
.select2-container .select2-selection--single:focus,
.select2-container .select2-selection--multiple:focus {
    border-bottom-color: currentColor !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 1.5rem;
    line-height: 2.5rem;
    color: inherit;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #aaa;
    font-style: italic;
}
.select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 2.5rem;
    top: 0;
    right: 0.25rem;
    width: 1.25rem;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b,
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
}

/* Match Select2 sizing to Bootstrap small controls when the original <select> is .form-control-sm */
select.form-control-sm + .select2-container {
    font-size: .875rem;
}
select.form-control-sm + .select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + .5rem + 2px) !important;
    min-height: calc(1.5em + .5rem + 2px) !important;
}
select.form-control-sm + .select2-container .select2-selection--single {
    min-height: calc(1.8125rem + 2px);
}
select.form-control-sm + .select2-container--default .select2-selection--single .select2-selection__rendered,
select.form-control-sm + .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + .5rem);
    padding-right: 2.25rem;
}
select.form-control-sm + .select2-container--default .select2-selection--single .select2-selection__arrow,
select.form-control-sm + .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: calc(1.8125rem + 2px);
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    float: none;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.15rem 0.5rem;
    color: inherit;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: inherit;
    margin-right: 0.25rem;
}
.select2-dropdown {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.select2-search--dropdown .select2-search__field {
    border: none !important;
    border-bottom: 2px solid #ccc !important;
    background: transparent !important;
    padding-left: 0;
    padding-right: 0;
}
.select2-search--dropdown .select2-search__field:focus {
    border-bottom-color: currentColor !important;
    outline: 0;
}

/* Select2 allowClear alignment (admin modals) */
.modal .select2-container--bootstrap4 .select2-selection--single {
    position: relative;
}
.modal .select2-container--bootstrap4 .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 2.1rem;
    top: 50%;
    transform: translateY(-50%);
    float: none !important;
    margin: 0 !important;
    padding: 0 .2rem !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: 1.15rem !important;
    color: rgba(0,0,0,.55) !important;
    background: transparent !important;
    border-radius: 0 !important;
}
.modal .select2-container--bootstrap4 .select2-selection--single .select2-selection__clear:hover {
    background: transparent !important;
    color: rgba(0,0,0,.8) !important;
}
.modal .select2-container--bootstrap4 .select2-selection--single .select2-selection__clear + .select2-selection__rendered {
    padding-right: 3.25rem !important;
}
.modal .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%);
    height: 1.6rem !important;
    right: .6rem !important;
}
.modal .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    margin-top: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
    background-color: color-mix(in srgb, var(--primary) 18%, #fff) !important;
    color: var(--primary-text, #fff) !important;
}
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--bootstrap4 .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--selected,
.select2-container--bootstrap4 .select2-results__option--selected {
    background-color: var(--primary) !important;
    color: var(--primary-text, #fff) !important;
}

/* ---------- Input groups ---------- */
.input-group {
    border: none !important;
    border-bottom: 2px solid #ccc !important;
    box-shadow: none !important;
}
.input-group:focus-within {
    border-bottom-color: currentColor !important;
}
.input-group .form-control,
.input-group .form-select,
.input-group .input-group-text,
.input-group .btn {
    border: none !important;
    /* background: transparent !important; */
    box-shadow: none !important;
    border-radius: 0 !important;
}
.input-group .input-group-text {
    padding: 0 0.5rem;
    color: #6c757d;
}

/* ---------- Checkboxes / Radios ---------- */
.form-check-input {
    border-radius: 0 !important; /* square corners */
}
.form-check-input:focus {
    box-shadow: none !important;
}

/* DataTables length select: underline-only look (theme specific) */
.dataTables_length select {
    border: none !important;
    border-bottom: 2px solid #ccc !important;
    background-color: transparent !important;
}

.card-header {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}
/* TR notify theming (minimal) */
:root {
    --tr-toast-border-width: 0px;
    --tr-toast-radius: 6px;
    --tr-toast-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    --tr-toast-body-bg: #ffffff;

    --tr-toast-info-header-bg: #78e3f7; /* softer cyan */
    --tr-toast-info-header-fg: #083742;
    --tr-toast-info-border: #35c6de;
    --tr-toast-info-icon: #35c6de;

    --tr-toast-success-header-bg: #58c08a; /* softer green */
    --tr-toast-success-header-fg: #ffffff;
    --tr-toast-success-border: #3aa66f;
    --tr-toast-success-icon: #3aa66f;

    --tr-toast-warn-header-bg: #ffd76a; /* softer amber */
    --tr-toast-warn-header-fg: #3a3a3a;
    --tr-toast-warn-border: #f4c133;
    --tr-toast-warn-icon: #c19a00;

    --tr-toast-error-header-bg: #ff7b88; /* softer red */
    --tr-toast-error-header-fg: #ffffff;
    --tr-toast-error-border: #e55361;
    --tr-toast-error-icon: #e55361;
}
