#logo {
    height: 30px;
}

.icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    background-color: var(--sub-background-color);
}

.icon:hover {
    transition: 1s;
    background-color: var(--secondary-color);
}

/* line-height: normal keeps the header the height it was before html got a base line height of 1.45:
   the logo and the icons are images on a text line, and a taller line made the bar 5px taller. */
.header {
    line-height: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--sub-background-color);
    color: var(--font-color);
}

.logo-container:hover {
    cursor: pointer;
}

.button-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.options-menu {
    position: absolute;
    top: 45px;
    right: 15px;
    background: var(--sub-background-color);
    border: 1px solid var(--secondary-accent-color);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: none;
    text-align: center;
    z-index: 1000;
}

.options-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
}

.options-menu-item a {
    display: block;
    color: var(--font-color);
    text-decoration: none;
}

.options-menu-item:hover {
    background: var(--secondary-accent-color);
    border-radius: 6px;
}

.options-menu-item:hover a {
    text-decoration: none;
}

/* email modal */
.feedback-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.feedback-modal {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  text-align: center;
}

.feedback-modal h2 {
  margin-top: 0;
  color: #333;
}

.feedback-modal textarea {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  font-family: inherit;
}

.feedback-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.feedback-actions button {
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}

#feedback-cancel {
  background: #ccc;
  color: #222;
}

#feedback-send {
  background: #4CAF50;
  color: white;
}

a {
  color: var(--font-color);
  text-decoration: none;
}

.calculator-button {
  background-image: url("/caddy/images/icons/calculator/calculator-light.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.calculator-button:hover {
  transition: 1s;
  background-color: var(--secondary-color);
}

.calculator-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.header-calculator-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.header-calculator-modal.hidden {
  display: none;
}

.header-calculator-backdrop {
  display: none;
}

.header-calculator-dialog {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 32px);
  margin: 80px auto 0;
  background: var(--sub-background-color);
  color: var(--font-color);
  border: 1px solid var(--secondary-accent-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  resize: both;
  min-width: 320px;
  min-height: 420px;
  pointer-events: auto;
}

.header-calculator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--secondary-accent-color);
}

.header-calculator-header h2 {
  margin: 0;
  font-size: 18px;
}

.header-calculator-close {
  border: none;
  background: transparent;
  color: var(--font-color);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.header-calculator-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: calc(100% - 61px);
  box-sizing: border-box;
}

.header-calculator-display {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--secondary-accent-color);
  background: var(--background-color);
  color: var(--font-color);
  font-size: 24px;
  text-align: right;
}

.header-calculator-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
}

.header-calculator-key {
  min-height: 48px;
  border: 1px solid var(--secondary-accent-color);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--font-color);
  font-size: 18px;
  cursor: pointer;
}

.header-calculator-key:hover {
  background: var(--secondary-color);
}

.header-calculator-zero {
  grid-column: span 2;
}

.header-calculator-equals {
  grid-column: span 1;
}

.header-calculator-operator,
.header-calculator-action,
.header-calculator-equals {
  font-weight: 700;
}

#header-calculator-drag-handle {
  cursor: move;
  user-select: none;
}

#header-calculator-dialog {
  position: relative;
}

#header-calculator-dialog.is-dragging {
  cursor: move;
}

/* ---------- the admin "view as" role picker ----------
   The Lite copy of CADdy Bid's header role picker (caddy-est/header.css). The button is injected
   by header.js for a real admin only; the banner shows while a preview is on. */

.role-picker-button {
  display: inline-flex;
  border-radius: 5px;
}

.role-picker-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.role-preview-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 10px 14px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
}

.role-preview-banner-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-preview-banner-stop {
  flex: 0 0 auto;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--background-color);
  color: var(--font-color);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.role-preview-banner-stop:hover {
  background: var(--secondary-accent-color);
}

.role-preview-banner-stop:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 600px) {
  .role-preview-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: space-between;
  }
}

/* ---------- header tabs (header.js, pages that set <body data-nav-section>) ----------
   Between the logo and the buttons, running the full height of the header so the marker under the
   current tab sits on the header's bottom edge. The negative margins cancel .header's 8px padding. */
.cl-nav-tabs {
    display: flex;
    align-self: stretch;
    gap: 2px;
    margin: -8px auto -8px 24px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.cl-nav-tabs::-webkit-scrollbar {
    display: none;
}

.cl-nav-tab {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 3px solid transparent;
    color: var(--font-color);
    font-size: var(--font-size-base, 0.95rem);
    font-weight: var(--font-weight-medium, 500);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.75;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.cl-nav-tab:hover {
    opacity: 1;
    background: var(--row-hover);
}

.cl-nav-tab:focus-visible {
    opacity: 1;
    outline: 2px solid var(--primary-accent-color);
    outline-offset: -2px;
}

.cl-nav-tab.is-on {
    opacity: 1;
    color: var(--primary-color);
    font-weight: var(--font-weight-bold, 700);
    border-bottom-color: var(--primary-color);
}

@media (max-width: 700px) {
    .cl-nav-tabs {
        margin-left: 12px;
    }
    .cl-nav-tab {
        padding: 0 10px;
        font-size: var(--font-size-sm, 0.85rem);
    }
}

/* A phone has room for the logo and the buttons and about two tabs between them, so the tabs take
   a row of their own under both, edge to edge, and still scroll sideways when they overflow. */
@media (max-width: 600px) {
    .header {
        flex-wrap: wrap;
    }
    .cl-nav-tabs {
        order: 3;
        flex: 1 0 100%;
        margin: 8px -16px -8px;
        padding: 0 6px;
        border-top: 1px solid var(--border-color);
    }
    .cl-nav-tab {
        min-height: 44px;
        padding: 0 10px;
    }
}

/* ---------- breadcrumb trail (header.js renders into a page's [data-nav-trail]) ---------- */
[data-nav-trail][hidden] {
    display: none !important;
}

.cl-trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm, 0.85rem);
    line-height: 1.4;
}

.cl-trail__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cl-trail__item + .cl-trail__item::before {
    content: "\203A";
    font-size: 1.1em;
    opacity: 0.5;
}

.cl-trail__link {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium, 500);
    text-decoration: none;
}

.cl-trail__link:hover,
.cl-trail__link:focus-visible {
    text-decoration: underline;
}

.cl-trail__here {
    color: var(--font-color);
    font-weight: var(--font-weight-bold, 700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 48ch;
}
