/* pagebar.css — generic top icon/text toolbar with underline active tab */

/* Default focus color (can be overridden by inline body style) */
body {
  --focus-color: #1767a7;
}

/* Outer wrapper so it can be centered and padded nicely */
.pagebar-wrap {
  max-width: 1500px;
  margin: 14px auto 14px;
  padding: 0 12px;
}

/* The card itself */
.pagebar {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

/* Inner bar that holds the icon tabs */
.pagebar-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Compact W3 buttons inside */
.pagebar .w3-button {
  padding: 8px 8px !important;
}

/* Tabs */
.pagebar .w3-button.pagebar-tab {
  position: relative;
  padding-top: 6px !important;
  padding-bottom: 16px !important;
}

/* Active tab uses focus color */
.pagebar .pagebar-tab.pagebar-tab-active {
  color: var(--focus-color) !important;
}

/* 3/4-width underline on active tab, also focus color */
.pagebar .pagebar-tab.pagebar-tab-active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: var(--focus-color);
  pointer-events: none;
}

/* Pagebar Font Awesome icons follow focus color (duotone) */
.pagebar .pagebar-tab i {
  --fa-primary-color: var(--focus-color);
  --fa-secondary-color: var(--focus-color);
}
/* Fallback size if FA kit is blocked locally (keeps toolbar height stable) */
.pagebar .pagebar-tab i.fa-2xl {
  font-size: 2em;
  line-height: 1;
}

/* Duotone pagebar icons follow the focus color */
.pagebar-icon {
  --fa-primary-color: var(--pagebar-focus-color, #1767a7);
  --fa-secondary-color: var(--pagebar-focus-color, #1767a7);
}
.pagebar .pagebar-tab .pagebar-icon-combo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}
.pagebar .pagebar-tab .pagebar-icon-combo-dollar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  font-size: 0.62em;
  color: var(--focus-color, #1767a7);
  pointer-events: none;
}

/* Fast hover tooltip for pagebar tabs */
.pagebar-tooltip {
  position: absolute;
  z-index: 9999;
  padding: 4px 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}

.pagebar-tooltip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.pagebar-tooltip.action-tip {
  background: var(--focus-color, #1767a7);
  color: var(--focus-contrast, #fff);
}

/* Kill the default iOS/Android gray tap highlight in the pagebar */
.pagebar .w3-button {
  -webkit-tap-highlight-color: transparent;
}

/* Base: no default W3 background inside pagebar */
.pagebar .w3-button {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Kill the W3 hover/focus/active gray overlay for desktop too */
.pagebar .w3-button:hover,
.pagebar .w3-button:focus,
.pagebar .w3-button:active {
  background-color: transparent !important;
  box-shadow: none !important;
}


/* On touch devices, don't keep the W3 hover/focus background */
@media (hover: none) and (pointer: coarse) {
  .pagebar .w3-button,
  .pagebar .w3-button:hover,
  .pagebar .w3-button:focus,
  .pagebar .w3-button:active {
    background-color: transparent !important;
    box-shadow: none !important;
  }
}
