/* Keep update details available without reserving a subtitle row. */
#dashboard-header {
  padding: 12px 32px;
  gap: 16px;
  flex-wrap: nowrap;
  z-index: 125;
}
#dashboard-header .header-content { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
#dashboard-header h1 { flex: none; }
#dashboard-header .header-details { display: flex; align-items: center; min-width: 0; gap: 10px; }
#dashboard-header .acapulco-clock-v104 { margin-left: 0; }
#dashboard-header .header-info { position: relative; display: inline-flex; flex: none; align-items: center; }
.header-info-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #d9e5f6; cursor: pointer; }
.header-info-button:hover, .header-info-button[aria-expanded="true"] { color: #fff; background: #ffffff20; }
.header-info-button:focus-visible { outline: 3px solid #f4c35d; outline-offset: 2px; }
.header-info-tooltip { position: absolute; z-index: 1; top: 100%; right: 0; width: max-content; max-width: min(290px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface, #fff); color: var(--text); box-shadow: 0 6px 24px #0004; font-size: 13px; line-height: 1.5; font-weight: 400; letter-spacing: 0; text-align: left; }
.header-info-tooltip[hidden] { display: none; }
.header-info-tooltip > * { display: block; }
.header-info-tooltip strong { margin-bottom: 4px; color: var(--navy); font-size: 13px; }
.header-info-tooltip #ts { font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) {
  #dashboard-header { padding: 10px 20px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  #dashboard-header .header-content, #dashboard-header .header-details { column-gap: 8px; }
  #dashboard-header h1 { font-size: 18px; }
  #dashboard-header .brand-logo { width: 44px; height: 44px; }
  #dashboard-header .acapulco-clock-v104 { font-size: 12px; padding-left: 10px; }
  #dashboard-header #acapulco-weather-v116 { gap: 6px !important; margin-left: 6px !important; padding-left: 10px !important; }
  #dashboard-header #acapulco-weather-v116 .wday { min-width: 32px !important; font-size: 9px !important; }
  #dashboard-header #acapulco-weather-v116 .wday .emoji { font-size: 16px !important; }
  #dashboard-header #acapulco-weather-v116 .wday .temps { font-size: 9px !important; }
}
@media (max-width: 767px) {
  #dashboard-header { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 2px 6px; align-items: center; padding: 10px 12px; }
  #dashboard-header .header-content, #dashboard-header .header-details { display: contents; }
  #dashboard-header h1 { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; line-height: 1.25; }
  #dashboard-header .brand-logo { flex: none; width: 36px; height: 36px; }
  #dashboard-header .brand-title { min-width: 0; }
  #dashboard-header .acapulco-clock-v104 { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 0 0 0 44px; border: 0; font-size: 11px; }
  #dashboard-header .header-info { grid-column: 2; grid-row: 1; }
  #dashboard-header .header-info-button { width: 44px; height: 44px; }
  #dashboard-header .theme-toggle { grid-column: 3; grid-row: 1; position: static; width: 44px; height: 44px; }
  #dashboard-header .header-info-tooltip { right: -50px; }
}

/* Compact phone controls keep the date and refresh action on one row. */
@media (max-width: 767px) {
  .mobile-context { justify-content: space-between; gap: 8px; }
  .mobile-context > strong { min-width: 0; }
  .mobile-context .acapulco-clock-v104 { display: inline-flex; flex: none; gap: 4px; margin: 0; padding: 0; border: 0; font-size: 11px; letter-spacing: 0; color: var(--text-muted); }
  .mobile-context .acapulco-clock-v104 .label { opacity: 1; font-weight: 500; }
  .mobile-context .acapulco-clock-v104 .time { color: var(--navy); }
  #dashboard-main .hoy-heading { margin-bottom: 12px; padding-bottom: 0; border-bottom: 0; }
  #dashboard-main .hoy-heading > span { display: none; }
  #dashboard-main .diario-controls { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; }
  #dashboard-main .diario-controls label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #dashboard-main .diario-controls input { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; min-height: 44px; }
  #dashboard-main .diario-controls button { grid-column: 2; grid-row: 1; min-height: 44px; white-space: nowrap; }
  #dashboard-main .diario-controls .diario-selected-dow { grid-column: 1; grid-row: 2; padding: 0 2px; border: 0; background: transparent; color: var(--text-muted); font-size: 12px; }
}
