/* Clock-first registration. The hero is the stempelur. Extra fields stay in
   the document, below a closed "Flere detaljer" disclosure, in normal flow. */

#entryPanel[hidden]{display:none !important}
#entryPanel{
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  min-width:0;
  position:relative;
  padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)) !important;
}
#entryPanel > .entry-network-note{
  position:absolute !important;width:1px !important;height:1px !important;
  margin:-1px !important;padding:0 !important;overflow:hidden !important;
  clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;
}
#entryPanel > h2{
  position:absolute !important;
  width:1px !important;height:1px !important;
  margin:-1px !important;padding:0 !important;overflow:hidden !important;
  clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;
}
#entryPanel > .quick-location{
  display:contents !important;
  width:auto !important;max-width:none !important;margin:0 !important;padding:0 !important;
  border:0 !important;background:transparent !important;box-shadow:none !important;
}
#entryPanel .place-compact{
  order:1;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:4px;
  width:100%;min-width:0;
  margin:0;padding:8px 10px;
  border:1.5px solid var(--vf-gold);
  border-radius:16px;
  background:var(--vf-cream);
  position:relative;
}
#entryPanel .place-compact > label{
  margin:0;font-size:13px;line-height:1.3;
}
#entryPanel .place-compact > select,
#entryPanel .place-compact select{
  width:100%;min-width:0;max-width:100%;min-height:48px;margin:0;
}
#entryPanel #quickProjectHint{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
#entryPanel #budgetEntryWarn:not([hidden]){margin:2px 0 0}

#entryPanel > .selected-project,
#entryPanel > #pendingAlert{order:2;width:100%;min-width:0}
#entryPanel > #stempelur{display:contents}
#entryPanel .stempelur-dial{
  order:3;
  align-self:center;
  box-sizing:border-box;
  width:min(100%,340px);
  width:min(100%,max(200px,calc(100svh - 430px)),400px);
  aspect-ratio:1;
  margin:2px auto 0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 50%,#173c31 0 63%,transparent 63.6%),
    conic-gradient(from 0deg,#edcf90,#c9a86a 28%,#e8d2a2 52%,#b8924f 76%,#edcf90);
  box-shadow:0 0 0 6px #c9a86a,0 8px 22px rgba(68,49,20,.16);
}
#entryPanel .stempelur-center{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;width:min(210px,68%);text-align:center;z-index:1;
}
#entryPanel .stempelur-readout{margin:0;color:#f8f1e6}
#entryPanel #stempelurHeroTime{
  color:#f8f1e6;font-weight:760;
  font-size:clamp(22px,6.2vw,36px);
  font-variant-numeric:tabular-nums;letter-spacing:.03em;
}
#entryPanel #stempelur .stempelur-center > button:not([hidden]){
  display:inline-flex;align-items:center;justify-content:center;
  box-sizing:border-box;
  width:clamp(88px,34%,128px);height:clamp(88px,34%,128px);
  min-width:88px;min-height:88px;aspect-ratio:1;
  margin:0;padding:0;border-radius:50%;
  border:2px solid #c9a86a;background:#10281f;color:#f8f1e6;
  font-size:clamp(18px,5vw,24px);font-weight:800;line-height:1;
  box-shadow:0 4px 14px rgba(8,24,18,.28);
}
#entryPanel #stempelurMessage,
#entryPanel #stempelurHeroWarn{
  order:3;width:100%;margin:0;text-align:center;min-width:0;
}
#entryPanel #stempelurMessage:empty{display:none}
#entryPanel #stempelurHeroWarn:not([hidden]){color:#72501f;font-size:14px;line-height:1.4}
body:has(#entryPanel:not([hidden])) #stempelurBar{display:none !important}

#entryPanel #entryDetails{
  order:4;
  box-sizing:border-box;
  width:100%;min-width:0;
  border:1.5px solid var(--vf-gold);
  border-radius:16px;
  background:var(--vf-cream);
  padding:0 12px;
}
#entryPanel #entryDetails > summary{
  display:flex;align-items:center;justify-content:center;gap:8px;
  min-height:48px;cursor:pointer;list-style:none;
  color:var(--vf-green);font-weight:750;
}
#entryPanel #entryDetails > summary::-webkit-details-marker{display:none}
#entryPanel #entryDetails > summary::after{
  content:"";width:8px;height:8px;border-right:2px solid var(--vf-gold);border-bottom:2px solid var(--vf-gold);
  transform:rotate(45deg) translateY(-2px);
}
#entryPanel #entryDetails[open]{padding-bottom:12px}
#entryPanel #entryDetails[open] > summary::after{transform:rotate(225deg) translateY(-1px)}
#entryPanel #entryDetails .quick-date{margin-top:8px;width:100%;min-width:0}
#entryPanel #favoriteProject:not([hidden]){margin:8px 0 0;max-width:100%}

#entryPanel .stempelur-more{
  order:5;
  box-sizing:border-box;
  display:flex;flex-direction:column;align-items:stretch;gap:6px;
  width:100%;min-width:0;
}
#entryPanel:not(:has(#entryDetails[open])) .stempelur-more{display:none !important}
#entryPanel .stempelur-more:has(#stempelurWarnHours[hidden]) > label[for="stempelurWarnHours"]{display:none}
#entryPanel .stempelur-more label,
#entryPanel .stempelur-more input,
#entryPanel .stempelur-more button,
#entryPanel .stempelur-more p{
  width:100%;max-width:100%;min-width:0;box-sizing:border-box;
  overflow-wrap:break-word;word-break:normal;
}

#entryPanel > #entryForm{
  order:6;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:12px;
  width:100%;min-width:0;
  grid-template-columns:none !important;
}
#entryPanel:not(:has(#entryDetails[open])) #entryForm > :not(.save-dock){display:none !important}
#entryPanel #entryForm > #clockPicker,
#entryPanel #entryForm > #clockLabel,
#entryPanel #entryForm > #clockFeedback,
#entryPanel #entryForm > .entry-extras{
  display:block;
  position:static !important;
  grid-column:auto !important;grid-row:auto !important;
  width:100% !important;max-width:100% !important;min-width:0 !important;
  margin:0 !important;
}
#entryPanel #entryForm > .entry-extras{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:8px !important;
  grid-template-columns:none !important;
}
#entryPanel .entry-extras > .comment-control,
#entryPanel .entry-extras > .bonus-control,
#entryPanel .comment-control,
#entryPanel .bonus-control{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  width:100% !important;max-width:100% !important;min-width:0 !important;
  position:static !important;margin:0 !important;
}
#entryPanel .entry-extras label,
#entryPanel .entry-extras input,
#entryPanel .entry-extras select,
#entryPanel .entry-extras textarea,
#entryPanel .entry-extras p,
#entryPanel .entry-extras button{
  position:static !important;
  grid-column:auto !important;grid-row:auto !important;
  width:100%;max-width:100%;min-width:0;box-sizing:border-box;
  overflow-wrap:break-word;word-break:normal;white-space:normal !important;
}
#entryPanel .entry-extras .comment-editor:not([hidden]),
#entryPanel .entry-extras .bonus-editor:not([hidden]){
  display:block !important;width:100%;max-width:100%;min-width:0;
}
#entryPanel #clockPicker .clock-frame{
  width:min(100%,360px) !important;max-width:100% !important;margin-inline:auto;
}
#entryPanel #clockPicker .clock-face,
#entryPanel #clockPicker .clock-frame .clock-face{
  width:100% !important;max-width:100% !important;
}
#entryPanel #clockPicker .clock-actions{
  display:flex !important;flex-direction:column !important;align-items:center !important;
  gap:8px !important;width:100% !important;position:static !important;
}
#entryPanel #clockPicker #clockBack,
#entryPanel #clockPicker #clockReset{
  position:static !important;
  grid-column:auto !important;grid-row:auto !important;
  width:auto !important;max-width:100% !important;min-width:min(100%,160px);
  white-space:normal !important;
}
#entryPanel #entryForm > .save-dock{
  /* Keep the save action after the form instead of above the clock on short screens. */
  position:static !important;z-index:auto;
  inset:auto;transform:none;
  box-sizing:border-box;
  width:100% !important;
  max-width:100%;
}
#entryPanel #entryForm > .save-dock > #submit{position:static !important;width:100%}
#entryDetails,#entryForm,.stempelur-more,.place-compact,.stempelur-dial{
  scroll-margin-bottom:calc(148px + env(safe-area-inset-bottom,0px));
}

@media (min-width:900px){
  #entryPanel .stempelur-dial{width:min(100%,400px)}
}

/* Registration-only clock and compact, clock-first mobile layout. */
#stempelurBar,
#reminderSettings,
#dayReminder{display:none !important}
#entryPanel .stempelur-dial{order:0}
#entryPanel .place-compact{order:1}
