/**
 * Tabler Icons Integration & Compatibility Styles
 * CertMind Platform
 */

:root {
  --bs-icon-size: 1.125rem;
}

/* Base icon styles */
.icon-base {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Sizing helpers */
.icon-xs {
  font-size: 0.75rem !important;
  width: 0.75rem !important;
  height: 0.75rem !important;
}

.icon-sm {
  font-size: 0.875rem !important;
  width: 0.875rem !important;
  height: 0.875rem !important;
}

.icon-md {
  font-size: 1.125rem !important;
  width: 1.125rem !important;
  height: 1.125rem !important;
}

.icon-lg {
  font-size: 1.25rem !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
}

.icon-xl {
  font-size: 1.5rem !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
}

.icon-16px {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
}

.icon-18px {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
}

.icon-20px {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
}

.icon-22px {
  font-size: 22px !important;
  width: 22px !important;
  height: 22px !important;
}

.icon-24px {
  font-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
}

.icon-28px {
  font-size: 28px !important;
  width: 28px !important;
  height: 28px !important;
}

.icon-32px {
  font-size: 32px !important;
  width: 32px !important;
  height: 32px !important;
}

/* Sidebar Dore Integration */
.sidebar .main-menu ul li a i.ti,
.sidebar .main-menu ul li i.ti,
.sidebar .sub-menu ul li a i.ti,
.sidebar .sub-menu ul li i.ti,
#app-container .menu .main-menu ul li i.ti {
  display: block;
  font-size: 28px !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 auto 6px auto;
  line-height: 1;
}

/* Navbar icon buttons */
.custom-navbar-right .pucs-icon-btn i.ti,
.navbar-right i.ti {
  font-size: 1.25rem;
  vertical-align: middle;
}

/* Button with icon */
.btn i.ti,
.btn .icon-base {
  vertical-align: -0.125em;
}

.btn-icon i.ti,
.btn-icon .icon-base {
  vertical-align: middle;
}

/* Fallback & Alias mappings */
.tabler-mustache {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4.5 13q4.5 0 7.5-4q3 4 7.5 4c2.5 0 2.5 3 0 5c-4.5 0-6.5-2.5-7.5-3.5c-1 1-3 3.5-7.5 3.5c-2.5 0-2.5-3 0-5'/%3E%3C/svg%3E");
}

.tabler-book-check {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v0a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2m0 9l2 2l4-4'/%3E%3C/svg%3E");
}

.tabler-circle-user,
.tabler-user-circle {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8'/%3E%3Cpath d='M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/g%3E%3C/svg%3E");
}

/* Actions Dropdown (3 dots) */
.btn.dropdown-toggle.hide-arrow::after,
.btn-empty.dropdown-toggle::after {
  display: none !important;
}

.dropdown-action-btn {
  background: transparent !important;
  border: none !important;
  color: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown-action-btn:hover,
.dropdown-action-btn:focus {
  background-color: rgba(0, 0, 0, 0.06) !important;
}

body.dark-mode .dropdown-action-btn:hover,
body.dark-mode .dropdown-action-btn:focus {
  background-color: rgba(255, 255, 255, 0.12) !important;
}

.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
}

.dropdown-menu .dropdown-item i.ti {
  font-size: 1.15rem;
}

/* ==========================================================================
   Bootstrap 4 Standard Tooltip Styling & Positioning Fixes
   Ensures tooltips have proper z-index, visibility, arrows and padding
   when container: 'body' is used across light and dark themes.
   ========================================================================== */
.tooltip {
  top: 0 !important;
  position: absolute;
  z-index: 1080 !important;
  display: block;
  margin: 0;
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  word-break: normal;
  word-spacing: normal;
  white-space: normal;
  line-break: auto;
  font-size: 0.78rem;
  word-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.tooltip.show {
  opacity: 1 !important;
}

.tooltip .arrow {
  position: absolute;
  display: block;
  width: 0.8rem;
  height: 0.4rem;
}

.tooltip .arrow::before {
  position: absolute;
  content: "";
  border-color: transparent;
  border-style: solid;
}

.bs-tooltip-top,
.bs-tooltip-auto[x-placement^="top"] {
  padding: 0.4rem 0;
}
.bs-tooltip-top .arrow,
.bs-tooltip-auto[x-placement^="top"] .arrow {
  bottom: 0;
  left: 50%;
  margin-left: -0.4rem;
}
.bs-tooltip-top .arrow::before,
.bs-tooltip-auto[x-placement^="top"] .arrow::before {
  top: 0;
  border-width: 0.4rem 0.4rem 0;
  border-top-color: #d7d7d7;
}

.bs-tooltip-right,
.bs-tooltip-auto[x-placement^="right"] {
  padding: 0 0.4rem;
}
.bs-tooltip-right .arrow,
.bs-tooltip-auto[x-placement^="right"] .arrow {
  left: 0;
  top: 50%;
  margin-top: -0.4rem;
  width: 0.4rem;
  height: 0.8rem;
}
.bs-tooltip-right .arrow::before,
.bs-tooltip-auto[x-placement^="right"] .arrow::before {
  right: 0;
  border-width: 0.4rem 0.4rem 0.4rem 0;
  border-right-color: #d7d7d7;
}

.bs-tooltip-bottom,
.bs-tooltip-auto[x-placement^="bottom"] {
  padding: 0.4rem 0;
}
.bs-tooltip-bottom .arrow,
.bs-tooltip-auto[x-placement^="bottom"] .arrow {
  top: 0;
  left: 50%;
  margin-left: -0.4rem;
}
.bs-tooltip-bottom .arrow::before,
.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
  bottom: 0;
  border-width: 0 0.4rem 0.4rem;
  border-bottom-color: #d7d7d7;
}

.bs-tooltip-left,
.bs-tooltip-auto[x-placement^="left"] {
  padding: 0 0.4rem;
}
.bs-tooltip-left .arrow,
.bs-tooltip-auto[x-placement^="left"] .arrow {
  right: 0;
  top: 50%;
  margin-top: -0.4rem;
  width: 0.4rem;
  height: 0.8rem;
}
.bs-tooltip-left .arrow::before,
.bs-tooltip-auto[x-placement^="left"] .arrow::before {
  left: 0;
  border-width: 0.4rem 0 0.4rem 0.4rem;
  border-left-color: #d7d7d7;
}

.tooltip-inner {
  max-width: 250px;
  padding: 0.35rem 0.65rem;
  color: #3a3a3a;
  text-align: center;
  background-color: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 0.2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
