/* =====================================================================
   Hemmersbach Meeting Summaries
   Brand: #f36b36 orange / #242424 dark grey / Roboto
   Class names align with the forms.hemmersbach.io engine so the
   existing styles.css can replace the shared parts of this file.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --hb-orange: #f36b36;
  --hb-orange-dark: #d9572a;
  --hb-dark: #242424;
  --hb-grey: #6b6b6b;
  --hb-border: #e4e4e4;
  --hb-bg: #f5f5f5;
  --hb-red: #c62828;
  --hb-green: #2e7d32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  background: var(--hb-bg);
  font-family: "Roboto", Arial, sans-serif;
  color: var(--hb-dark);
}

/* ------------------------- card ------------------------- */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  flex-direction: column;
  position: relative;
}
.card.wide { max-width: 760px; }

.card-logo { position: absolute; top: 10px; right: 10px; height: 30px; width: auto; }

.card-head { margin-bottom: 20px; padding-right: 44px; }
.form-title { font-size: 22px; font-weight: 700; }
.form-subtitle { font-size: 14px; color: var(--hb-grey); margin-top: 6px; line-height: 1.5; }

.card-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--hb-border);
  font-size: 12px;
  color: var(--hb-grey);
  line-height: 1.5;
}

/* ------------------------- state overlays ------------------------- */
.state-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 8px;
  gap: 12px;
}
.state-title { font-size: 18px; font-weight: 700; }
.state-sub { font-size: 14px; color: var(--hb-grey); line-height: 1.5; max-width: 320px; }

.state-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
}
.state-icon-wrap.orange { background: var(--hb-orange); }
.state-icon-wrap.red { background: var(--hb-red); }

.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--hb-border);
  border-top-color: var(--hb-orange);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.5s; }
}

.sign-in-btn {
  margin-top: 8px;
  background: var(--hb-dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.sign-in-btn:hover { background: #000; }

/* ------------------------- toolbar ------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.search-input {
  flex: 1;
  border: 1px solid var(--hb-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.search-input:focus {
  outline: 2px solid var(--hb-orange);
  outline-offset: -1px;
  border-color: transparent;
}
.user-chip {
  font-size: 13px;
  color: var(--hb-grey);
  white-space: nowrap;
}

/* ------------------------- meeting list ------------------------- */
.meeting-list { display: flex; flex-direction: column; }

.meeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--hb-border);
}
.meeting-row:last-child { border-bottom: none; }

.meeting-info { min-width: 0; }
.meeting-subject {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meeting-meta {
  font-size: 13px;
  color: var(--hb-grey);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.meta-sep { color: var(--hb-border); }

.badge-organizer {
  background: rgba(243, 107, 54, 0.12);
  color: var(--hb-orange-dark);
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  padding: 2px 8px;
}

.summary-btn {
  flex-shrink: 0;
  background: var(--hb-orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  min-width: 110px;
}
.summary-btn:hover:not(:disabled) { background: var(--hb-orange-dark); }
.summary-btn:focus-visible { outline: 2px solid var(--hb-dark); outline-offset: 2px; }
.summary-btn:disabled { cursor: default; opacity: 0.75; }
.summary-btn.success { background: var(--hb-green); opacity: 1; }

.list-empty {
  text-align: center;
  color: var(--hb-grey);
  font-size: 14px;
  padding: 32px 0;
}

/* ------------------------- error banner ------------------------- */
.error-banner {
  display: none;
  background: #fdecea;
  color: var(--hb-red);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* ------------------------- mobile ------------------------- */
@media (max-width: 560px) {
  .card { padding: 20px; }
  .meeting-row { flex-direction: column; align-items: stretch; }
  .summary-btn { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .user-chip { text-align: right; }
}
