/* ==========================================================================
   Histriphy 21.3.0 · Queued Project-panel corrections
   Small, targeted fixes carried over from 21.2.1. Layout only — no redesign,
   no new components, and no change to what the panel does.

   All three come from one root cause: builder.css styles EVERY input inside
   .geo-builder-field as a full-width 40px text box. That is right for the title
   and year fields and wrong for the checkboxes that share those fields, so the
   "No date / not applicable" control and the category chips were being laid out
   against an invisible 40px-tall, 100%-wide box.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · "No date / not applicable"
   Restore it to a real checkbox on a single baseline-aligned row, with breathing
   room from the Year field above and its explanatory note below.
   -------------------------------------------------------------------------- */
.histriphy-studio-react .submission-no-year{
  display:flex;
  align-items:center;
  gap:9px;
  margin:10px 0 6px;
  cursor:pointer;
}
/* builder-v46.css sets min-height:40px !important on every .geo-builder-field
   input, which is right for the text fields this checkbox shares a field with
   and wrong for the checkbox. Matching that weight is the only way to undo it
   without editing the frozen bundle or the verified base sheet. */
.histriphy-studio-react .submission-no-year input[type="checkbox"]{
  flex:none;
  width:16px!important;
  height:16px!important;
  min-height:0!important;
  margin:0;
  padding:0;
  border-radius:4px;
  accent-color:var(--gold-4);
  cursor:pointer;
}
.histriphy-studio-react .submission-no-year span{
  min-width:0;
  color:var(--n17);
  font-size:.7rem;
  line-height:1.35;
}
.histriphy-studio-react .submission-no-year input:disabled,
.histriphy-studio-react .submission-no-year input:disabled + span{
  opacity:.55;
  cursor:not-allowed;
}
/* The note explains the checkbox, so it sits under it rather than crowding it. */
.histriphy-studio-react .geo-builder-field>small{
  display:block;
  margin-top:2px;
  color:var(--n11);
  font-size:.6rem;
  line-height:1.5;
}

/* --------------------------------------------------------------------------
   2 · Category chips
   The hidden checkbox is absolutely positioned but still inherited width:100%
   and height:40px, which stretched the chip rows and left Empires and Modern
   Borders sitting on inconsistent baselines. Neutralise the inherited box and
   align every chip to one height.
   -------------------------------------------------------------------------- */
.histriphy-studio-react .geo-builder-category-list{
  align-items:center;
  gap:7px 6px;
  margin-top:2px;
}
.histriphy-studio-react .geo-builder-category-list label{
  display:inline-flex;
  position:relative;
  min-width:0;
}
.histriphy-studio-react .geo-builder-category-list input{
  width:1px!important;
  height:1px!important;
  min-height:0!important;
  margin:0;
  padding:0;
  border:0;
}
.histriphy-studio-react .geo-builder-category-list span{
  align-items:center;
  min-height:30px;
  padding:0 11px;
  line-height:1.2;
  white-space:nowrap;
  /* A long category name wraps inside its own chip instead of widening the
     panel — the 21.2.1 no-horizontal-overflow rule applies here too. */
  overflow-wrap:anywhere;
}
@media (max-width:360px){
  .histriphy-studio-react .geo-builder-category-list span{white-space:normal;text-align:center}
}

/* --------------------------------------------------------------------------
   3 · Export button above Submit
   8px of separation read as "these two buttons are a pair", but Export is a
   local action and Submit sends the map to Histriphy for review. Give Export
   its own space, above a hairline that marks the boundary.
   -------------------------------------------------------------------------- */
.histriphy-studio-react .geo-builder-export-button{
  margin:2px 0 14px;
}
.histriphy-studio-react .geo-builder-submit-button{
  position:relative;
  margin-top:0;
}
.histriphy-studio-react .geo-builder-export-button + .geo-builder-submit-button::before,
.histriphy-studio-react .geo-builder-export-button + .geo-builder-submit-button::after{
  content:none;
}
.histriphy-studio-react .geo-builder-project-summary{
  margin:14px 0 15px;
  padding-bottom:14px;
  border-bottom:1px solid color-mix(in srgb, var(--n15) 14%, transparent);
  border-radius:8px 8px 0 0;
}

/* Short viewports: keep the action buttons reachable without shrinking the
   controls above them into an unreadable strip. */
@media (max-height:760px){
  .histriphy-studio-react .geo-builder-export-button{margin-bottom:10px}
  .histriphy-studio-react .geo-builder-project-summary{margin:11px 0 12px;padding-bottom:11px}
}
