/**
 * Global style definitions
 */

body {
  font-family: system-ui, sans-serif;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  border: 1px solid #8886;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

label {
  display: block;
  margin: 0.5rem 0;
}

/* Form fields: the UIX theme sets transparent input borders, so the border
   is forced here to keep the fields visible. */
input[type="text"] {
  border: 2px solid #555 !important;
  border-style: solid !important;
}

input {
  display: block;
  padding: 0.5rem 0.6rem;
  margin-top: 0.25rem;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #555;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font: inherit;
}

/* The UIX theme marks empty required fields red on focus. Use the app's
   neutral focus color instead, so selecting a field never looks like an error. */
input:focus,
input:invalid:focus {
  outline: 2px solid #4a90e2 !important;
  outline-offset: 1px;
}

input:invalid {
  border-color: #555 !important;
}

button {
  padding: 0.45rem 0.9rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  cursor: pointer;
}

button.secondary {
  opacity: 0.8;
}

.error {
  color: #c0392b;
  margin: 0.5rem 0;
}

.result {
  font-size: 1.05rem;
}

.votes {
  font-size: 0.95rem;
  opacity: 0.85;
}

.participants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.seat {
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  border: 2px solid transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.seat span {
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

/* Colors plus a text label, so the choice is readable without color */
.seat-yes { background: #2e7d32; }
.seat-no { background: #c62828; }
.seat-abstain { background: #ef6c00; }
.seat-none {
  background: transparent;
  color: inherit;
  border-color: #8888;
}
.seat-none span { opacity: 0.7; font-weight: normal; }

/* Start page: centered column */
.start {
  position: fixed;
  inset: 0;
  overflow: auto;
  padding: 1rem;
  box-sizing: border-box;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.start .card {
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.start form label {
  text-align: left;
}

.vote-panel {
  padding-bottom: 1rem;
  border-bottom: 1px solid #8886;
}

.participants-panel {
  padding-top: 1rem;
}

.participants-panel h4 {
  margin: 0 0 0.5rem;
}

/* Headings inside cards: no extra top margin, so the card has no gap above */
.card h2 {
  margin-top: 0;
}

.room-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.room-header h1 {
  margin: 0.5rem 0;
}

.speaker-panel h2 {
  margin: 0;
}

.speaker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.speaker-header > span {
  opacity: 0.7;
}

.speakers {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.speaker {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  border-left: 4px solid #1565c0;
  background: #e3f2fd;
}

.speaker span {
  opacity: 0.7;
}

.speaker-own {
  border-left-color: #ef6c00;
  background: #fff3e0;
  box-shadow: 0 0 0 2px #ef6c0066;
}

/* Own participant: thicker outline and a marker, so people can find themselves */
.seat-own {
  border: 3px solid #1565c0;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1565c0;
}
.seat-own.seat-none {
  border-color: #1565c0;
  background: #e3f2fd;
  color: #0d47a1;
}
.seat-own.seat-none span { opacity: 1; }
