/* #region zone:flights.shared-controls — ส่วนค้นหา ไอคอน และกล่องสมัครปฏิทินที่ v3 ยังใช้ */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.section-title h2,
.result-section h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
}
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.result-section {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}
.state-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 96px;
  padding: var(--space-3) 0;
  color: var(--muted);
  border: 0;
}
.state-card p,
.state-card small {
  margin: 0;
}
.state-card > .feature-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-secondary);
  background: transparent;
}
.flight-icon {
  display: block;
  flex: none;
}

.roster-calendar-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--panel);
  color: var(--fg);
  box-sizing: border-box;
}
.roster-calendar-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: var(--u-space-4);
}
.roster-calendar-dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
}
.roster-calendar-dialog h2 {
  margin: 0;
  font-size: var(--u-text-xl);
  overflow-wrap: anywhere;
}
.roster-dialog-body {
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--u-space-3);
}
.roster-dialog-body p {
  margin: 0;
  overflow-wrap: anywhere;
}
.roster-dialog-body small {
  color: var(--muted);
}
.roster-calendar-dialog footer {
  display: flex;
  justify-content: flex-end;
}
.roster-calendar-dialog .btn,
#calendar-subscription .btn {
  min-height: 44px;
  min-width: 44px;
  white-space: normal;
}
.roster-dialog-body input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: var(--u-space-2);
}
.calendar-feed-links,
.calendar-feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--u-space-2);
}
.calendar-feed-links .btn,
.calendar-feed-actions .btn {
  flex: 1 1 140px;
  text-align: center;
}
#calendar-subscription {
  margin-block: var(--u-space-3);
}

/* The shared search calendar still uses select fields on narrow screens. */
.calendar-selects {
  margin-top: var(--u-space-3);
  display: grid;
  gap: var(--u-space-3);
}
.calendar-selects label {
  display: grid;
  gap: var(--u-space-1);
  color: var(--muted);
  font-size: 0.875rem;
}
.calendar-selects select,
.calendar-selects button {
  min-height: 44px;
  color: var(--fg);
  font: inherit;
  background: var(--panel-raised);
  border: 1px solid var(--control-line);
  border-radius: 12px;
  padding: var(--u-space-2) var(--u-space-3);
}
@media (max-width: 369px) {
  html:root .calendar-grid,
  html:root .calendar-month {
    display: none;
  }
  .calendar-selects[hidden] {
    display: grid !important;
  }
}
/* #endregion */
