/* Shared header, menu, footer, dialog and tooltip surfaces for the new design. */

.site-header {
  position: relative;
}

.header-top {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0px 24px;
}

.header-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 10px;
}

.days-remaining {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 15px;
}

@container (min-width: 768px) {
  .days-remaining {
    display: block;
  }
}

@container (min-width: 768px) and (max-width: 1279.98px) {
  .days-remaining {
    font-size: 13px;
  }
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--surface);
  cursor: pointer;
  visibility: visible;
  border: 1px solid var(--accent-border);
  border-radius: var(--pill-radius);
}

.action-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-pill {
  background-color: var(--surface);
  border-radius: 50%;
  width: var(--pill-height);
  height: var(--pill-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-border);
}

.action-pill.expanded {
  width: fit-content;
  padding: 0px 16px;
  border-radius: var(--pill-radius);
}

.action-pill.expanded .action-pill-collapsed {
  display: none;
}

.action-pill-expanded {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 4px;
  white-space: nowrap;
}

.action-pill.expanded .action-pill-expanded {
  display: flex;
}

.action-pill-icon {
  color: var(--accent-dark);
  appearance: none;
  border: 0;
  background: none;
  padding: 0px;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
  display: block;
}

.action-pill-icon svg {
  fill: currentColor;
  display: block;
  pointer-events: none;
}

.action-pill a {
  color: var(--accent-primary);
}

.separator {
  color: var(--accent-dark);
  margin: 0px 6px;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0px;
  background: var(--panel-bg);
  z-index: 50;
  overflow-y: auto;
}

@container (min-width: 768px) {
  .menu-overlay {
    position: absolute;
    inset: 100% 24px auto auto;
    transform: none;
    width: min(var(--site-menu-width), calc(100vw - 48px));
    height: auto;
    margin-top: 8px;
    box-shadow: var(--shadow-color) 0px 10px 30px;
    border: 1px solid var(--accent-border);
    border-radius: var(--panel-radius);
  }
}

.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--accent-light);
}

@container (min-width: 768px) {
  .mobile-header {
    display: none;
  }
}

.mobile-header-title {
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 16px;
}

.mobile-close {
  border: 0;
  background: none;
  color: var(--accent-primary);
  font-size: 22px;
  cursor: pointer;
}

.menu-list {
  margin: 0px;
  padding: 10px 16px;
  list-style: none;
}

@container (max-width: 767.98px) {
  .menu-list {
    padding: 8px 20px 24px;
  }
}

.menu-row {
  border-bottom: 1px solid var(--accent-light);
  padding: var(--row-padding);
}

.menu-row-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  background: none;
  padding: 0px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: var(--row-font-size);
}

.menu-row-label svg path {
  stroke: var(--accent-primary);
}

.menu-children {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0px 0px;
  padding: 0px 10px 0px 0px;
  list-style: none;
}

.menu-row.open .menu-children {
  display: flex;
}

.menu-child {
  font-size: var(--child-font-size);
  color: var(--accent-primary);
}

.icon-hidden {
  display: none;
}

.site-footer {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
  border-top: 1px solid var(--accent-light);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent-primary);
}

.daf-modal-backdrop {
  position: fixed;
  inset: 0px;
  background: var(--overlay-light);
  z-index: var(--layer-modal-backdrop);
}

.daf-modal {
  position: fixed;
  inset: 0px;
  z-index: var(--layer-modal);
  pointer-events: none;
}

.daf-modal-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--desk-gold-edge);
  border-radius: var(--panel-radius);
  background: var(--panel-bg);
  background-clip: padding-box;
  box-shadow: 0 12px 28px var(--shadow-color);
  overflow: hidden;
  pointer-events: auto;
}
:is(.daf-modal-titlebar, .site-popup-titlebar, .site-popover-heading) {
  flex-shrink: 0;
  min-height: 66px;
  height: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 4px;
  color: var(--reading-ink);
  font: 600 16px / 22px Assistant, Arial, sans-serif;
  direction: rtl;
  cursor: move;
  background: var(--desk-gilded);
  border-bottom: 1px solid var(--panel-border);
  border-radius: calc(var(--panel-radius) - 1px) calc(var(--panel-radius) - 1px) 0 0;
}
.daf-modal-title { font: inherit; }
:is(.daf-modal-titlebar, .site-popup-titlebar, .site-popover-heading) button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 9px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-primary);
  font: 22px Assistant, Arial, sans-serif;
  opacity: 1;
  cursor: pointer;
}
:is(.daf-modal-titlebar, .site-popup-titlebar, .site-popover-heading) button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}
:is(.daf-modal-titlebar, .site-popup-titlebar, .site-popover-heading) button:hover { background: var(--accent-soft); }

.daf-modal-content {
  flex: 1 1 0%;
  min-height: 0px;
  overflow: auto;
  direction: rtl;
}

.daf-modal-html {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
}

.daf-modal-content iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.desk-tooltip {
  position: fixed;
  inset: auto;
  margin: 0px;
  border: 0px;
  z-index: 2147483647;
  box-sizing: border-box;
  max-width: calc(-16px + 100vw);
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  padding: 7px 11px;
  border-radius: 7px;
  background: var(--tip-bg);
  color: var(--surface);
  font: 14px / 1.4 Assistant, Arial, sans-serif;
  direction: rtl;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-color) 0px 3px 12px;
  pointer-events: none;
}

.desk-tooltip[hidden] {
  display: none !important;
}

.menu-list .menu-row > .menu-children {
  display: none;
}

.menu-list .menu-row.open > .menu-children {
  display: flex;
}

.menu-nested-row {
  border-bottom: 0px;
  padding: 0px;
}

.menu-nested-row > .menu-row-label {
  font-size: var(--child-font-size);
  font-weight: 400;
  color: var(--accent-primary);
  gap: 10px;
  text-align: start;
}

.menu-nested-row > .menu-children {
  margin: 10px 0px 6px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--panel-border);
}

.menu-nested-row .menu-child {
  display: block;
  padding-block: 3px;
}

.site-footer {
  padding: 10px 0px 2px;
  line-height: 1.6;
}

.days-remaining > span {
  line-height: 1;
}

.daf-modal[popover], .daf-modal-backdrop[popover] {
  margin: 0px;
  border: 0px;
  padding: 0px;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.daf-modal[popover] {
  background: transparent;
  color: inherit;
  overflow: visible;
}

:is(.site-popup-titlebar,.site-popover-heading) :is(h2,strong,.site-popup-title){font:inherit;margin:0;min-width:0;flex:1;overflow-wrap:anywhere}

/* Native content dialogs reuse the footer modal surface and scroll ownership. */
dialog.daf-modal-container { position:fixed; inset:0; margin:auto; height:fit-content; padding:0; color:var(--text-body); }
dialog.daf-modal-container:not([open]) { display:none; }
dialog.daf-modal-container::backdrop { background:var(--overlay-dim); }
dialog.daf-modal-container > .daf-modal-content { flex:1 1 auto; }

/* One close glyph, independent of page font metrics. */
:is(.daf-modal-titlebar,.site-popup-titlebar,.site-popover-heading) button .site-popup-close-icon{width:18px;height:18px;flex:0 0 18px}

/* Header icons share one glyph size; hit targets remain 36px. */
:is(.daf-modal-titlebar,.site-popup-titlebar,.site-popover-heading) svg{width:18px;height:18px;flex:0 0 18px}
