/* Late layout overrides loaded after the main Transparenta visual layer. */

/* The mobile authentication shell has a light background, so it deliberately
 * uses the previous dark-ink/green lockup rather than the white inverse logo. */
.transparenta-brand--light {
  width: min(100%, 290px);
  min-width: 0;
  line-height: 0;
}

/* Announcement authoring is intentionally multiline. This unlayered, scoped
 * rule is loaded after Transparenta's general `.field { height: 36px }`
 * override, so the textarea's rows cannot collapse into a one-line control. */
.communications-editor.field {
  height: auto;
  min-height: 14rem;
  line-height: 1.5;
  resize: vertical;
}

/* Communications audience criteria are additive checkbox groups, not native
 * modifier-key multi-selects. Keep every choice operable without JavaScript;
 * search, count, and group-clear are progressive enhancements. */
.communications-audience {
  display: grid;
  min-width: 0;
  gap: var(--spacing-form-section);
}

.communications-audience__intro,
.communications-audience-selector__heading {
  display: grid;
  gap: var(--spacing-form-tight);
}

.communications-audience__all,
.communications-audience-selector,
.communications-audience-summary {
  min-width: 0;
  padding: var(--spacing-form-field);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-field);
  background: var(--color-surface);
}

.communications-audience__all {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
}

.communications-audience__all-choice,
.communications-audience-selector__choice {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: var(--spacing-form-control);
  cursor: pointer;
}

.communications-audience__all-choice > .field-checkbox,
.communications-audience-selector__choice > input[type="checkbox"] {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: var(--spacing-form-tight);
  accent-color: var(--color-accent);
}

.communications-audience__all-choice span,
.communications-audience-selector__choice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.communications-audience-selector {
  display: grid;
  gap: var(--spacing-form-control);
}

.communications-audience-selector__heading,
.communications-audience-selector__footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-form-control);
}

.communications-audience-selector__heading .field-label,
.communications-audience-selector__footer .field-help {
  margin: 0;
}

.communications-audience-selector__count {
  color: var(--color-ink-muted);
  font-size: var(--text-2xs);
  white-space: nowrap;
}

.communications-audience-selector__search.field {
  width: 100%;
  min-width: 0;
}

.communications-audience-selector__choices {
  display: grid;
  max-height: 15rem;
  min-width: 0;
  gap: var(--spacing-form-tight);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--spacing-form-tight);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-field);
  background: var(--color-canvas);
}

.communications-audience-selector__choice {
  min-height: 44px;
  padding: var(--spacing-form-control);
  border-radius: var(--radius-field);
  color: var(--color-ink);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.communications-audience-selector__choice:hover {
  background: var(--color-accent-soft);
}

.communications-audience-selector__choice:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.communications-audience-selector__empty {
  padding: var(--spacing-form-control);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

.communications-audience-summary {
  display: grid;
  gap: var(--spacing-form-control);
  background: var(--color-canvas);
}

.communications-audience-summary__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-form-control) var(--spacing-form-field);
  color: var(--color-ink-muted);
  font-size: var(--text-xs);
}

/* Poll's two ordinary multiline controls need the same scoped protection from
 * the late `.field { height: 36px }` visual override as Announcement text. */
.communications-poll-body.field,
.communications-poll-options.field {
  height: auto;
  min-height: 8rem;
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 639px) {
  .communications-audience__all,
  .communications-audience-selector,
  .communications-audience-summary {
    padding: var(--spacing-form-control);
  }

  .communications-audience-selector__footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .communications-audience-selector__footer .btn {
    justify-self: start;
  }
}

.transparenta-brand-lockup--light {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.transparenta-auth-mobile-brand .transparenta-brand--light {
  width: min(100%, 290px);
}

/* Narrower reading width for the investor cabinet. */
.transparenta-investor-width {
  max-width: 1120px !important;
}

/* Calendar KPI values need an explicit late-layer modifier. `transparenta.css`
 * is loaded after Tailwind and owns the global `.kpi-value` font size, so
 * utility classes on the template cannot reliably override it in production. */
.kpi-value--calendar {
  font-size: 13px;
  letter-spacing: -.04em;
}

@media (min-width: 640px) {
  .kpi-value--calendar {
    font-size: 20px;
  }
}

@media (min-width: 1024px) {
  .kpi-value--calendar {
    font-size: 28px;
  }
}

/* Finance reuses the Calendar KPI component, but its four-column Overview is
 * a financial dashboard rather than a dense calendar header. Keep long rupiah
 * values compact without changing Calendar or the lower Finance result cards. */
@media (min-width: 1024px) {
  #finance-workspace [data-calendar-kpi-grid] .kpi-value--calendar {
    font-size: clamp(18px, 1.45vw, 22px);
  }
}

/* The management Calendar uses the same four-card operational KPI row. Keep
 * its desktop values at the accepted Finance scale while preserving the
 * Investor Calendar's global 28px desktop hierarchy. */
@media (min-width: 1024px) {
  .reservations-workspace .reservations-kpi-block [data-calendar-kpi-grid] .kpi-value--calendar {
    font-size: clamp(18px, 1.45vw, 22px);
  }
}

/* Calendar is intentionally dense on desktop, but the same desktop type scale
 * overpowers the two-column KPI grid and 64px day lanes on a phone. Keep these
 * overrides scoped to the management Reservations workspace so Finance and the
 * investor portal retain their own type hierarchy. */
@media (max-width: 639px) {
  .reservations-workspace .reservations-kpi-block > .grid {
    gap: 8px;
  }

  .reservations-workspace .reservations-kpi-block > .grid > .card {
    min-width: 0;
    padding: 12px;
  }

  .reservations-workspace .reservations-kpi-block .section-label {
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: .025em;
  }

  .reservations-workspace .reservations-kpi-block .kpi-value--calendar {
    font-size: 13px;
    line-height: 1.08;
    letter-spacing: -.04em;
    white-space: nowrap;
  }

  .reservations-workspace .reservations-kpi-block .text-2xs {
    font-size: 10px;
    line-height: 1.35;
  }

  .reservations-workspace .tabs {
    gap: 10px;
  }

  .reservations-workspace .tab {
    padding: 9px 1px 8px;
    font-size: 12px;
  }

  .reservations-workspace .pill {
    font-size: 10px;
  }

  #reservations-workspace-pool {
    max-width: 150px;
    font-size: 12px;
  }

  .reservations-workspace .calendar-period-nav .btn {
    font-size: 11px;
  }

  .reservations-workspace .calendar-period-label {
    gap: 5px;
    padding-inline: 8px;
    font-size: 12px;
  }

  .reservations-workspace .cal-grid--reservations .cal-head-date {
    font-size: 11px;
  }

  .reservations-workspace .cal-grid--reservations .cal-head-pct {
    font-size: 9px;
  }

  .reservations-workspace .cal-grid--reservations .cal-group {
    font-size: 11px;
  }

  .reservations-workspace .cal-grid--reservations .cal-unit .mono,
  .reservations-workspace .cal-grid--reservations .cal-bar {
    font-size: 10px;
  }
}
