html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Fix Bootstrap tab content visibility - ensure active tabs are always visible */
.tab-pane.active,
.tab-pane.show.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.tab-pane:not(.active) {
  display: none !important;
}

/* Override Bootstrap fade that might hide content */
.tab-content .tab-pane.fade {
  opacity: 1 !important;
}

.tab-content .tab-pane.fade.show.active {
  opacity: 1 !important;
  display: block !important;
}
/* ========================================
   OnlineMes PanelX Custom Styles
   ======================================== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #245169 url('/images/bg2020.jpg') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

/* PanelX Style Top Navbar */
.panelx-navbar {
    background: #222;
    border-bottom: 3px solid var(--primary-color);
    min-height: 35px;
    margin-bottom: 0;
    z-index: 1050;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.panelx-navbar .navbar-nav>li>a {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    color: #fff !important;
    font-size: 13px;
}

.panelx-navbar .navbar-nav>li>a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.panelx-navbar .dropdown-menu {
    background: #333;
    border: 1px solid #444;
}

.panelx-navbar .dropdown-menu>li>a,
.panelx-navbar .dropdown-menu .dropdown-item {
    color: #fff;
    padding: 5px 15px;
    font-size: 12px;
}

.panelx-navbar .dropdown-menu>li>a:hover,
.panelx-navbar .dropdown-menu .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.3);
}

.panelx-navbar .dropdown-submenu {
    position: relative;
}

.panelx-navbar .dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
}

.panelx-navbar .dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

.panelx-navbar .dropdown-submenu>a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

.panelx-navbar .navbar-toggle {
    margin-top: 0px;
    margin-bottom: 0px;
    border-color: #444;
}

.panelx-navbar .navbar-toggle .icon-bar {
    background-color: #fff;
}

/* Hide sidebar */
.main-sidebar {
    display: none !important;
}

.content-wrapper {
    background: transparent !important;
    margin-top: 0;
    padding-top: 50px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0 !important;
}

.content {
    padding-top: 10px;
}

.container-fluid {
    padding-top: 10px;
}

.main-footer {
    margin-left: 0 !important;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.card-header {
    background: rgba(102, 126, 234, 0.1) !important;
    padding: 0.5rem 1rem;
}

.card-body {
    padding: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

/* Compact/Dense Form Elements */
.form-control,
.form-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: calc(1.5em + 0.5rem + 2px);
}

.form-control-sm,
.form-select-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.8125rem;
    min-height: calc(1.5em + 0.3rem + 2px);
}

.btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-sm {
    padding: 0.15rem 0.5rem;
    font-size: 0.8125rem;
}

.input-group-text {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 0.75rem;
}

/* DataTables Dense/Compact Styling */
table.table {
    font-size: 0.75rem !important;
}

table.table th,
table.table td {
    padding: 0.3rem 0.4rem !important;
    vertical-align: middle !important;
}

table.table th {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    background-color: rgba(102, 126, 234, 0.05) !important;
}

table.table-sm th,
table.table-sm td {
    padding: 0.2rem 0.3rem !important;
    font-size: 0.7rem !important;
}

table.dataTable tbody tr {
    height: auto !important;
}

table.dataTable.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

table .btn-sm {
    padding: 0.1rem 0.4rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
}

table .btn-sm i {
    font-size: 0.7rem !important;
}

/* DataTables specific */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.75rem !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.75rem !important;
    height: calc(1.3em + 0.4rem + 2px) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Select2 Custom Styling - Compact */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: calc(1.5em + 0.5rem + 2px);
}

.select2-container--bootstrap-5 .select2-selection--single {
    padding: 0.25rem 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
    line-height: 1.5;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.5rem);
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.15rem 0.3rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    padding: 0.1rem 0.4rem;
    font-size: 0.8125rem;
    margin: 0.1rem 0.2rem 0.1rem 0;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.select2-dropdown {
    border: 1px solid #667eea;
    border-radius: 0.375rem;
    font-size: 0.75rem !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.15rem 0.4rem !important;
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    min-height: auto !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #667eea !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.75rem !important;
    height: calc(1.3em + 0.4rem + 2px) !important;
}

.select2-results__options {
    max-height: 300px !important;
}

.select2-container--bootstrap-5 .select2-results__group {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600;
}

.select2-search--dropdown {
    padding: 0.25rem 0.25rem !important;
}

.select2-results__options li {
    padding: 0.15rem 0.4rem !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
}

/* Navigation Menu TODO Badge Styles */
.dropdown-item .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    margin-left: 0.25rem;
    font-weight: 600;
}

.dropdown-item:hover .badge {
    background-color: #ff9800 !important;
}

.nav-item .badge {
    vertical-align: middle;
}

/* Dropdown Submenu Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}
