/* CrossFit Sjöstaden – feedbackplatta
   Grafisk profil: DM Sans, Off White #F7F5F2, Black #1A1A1A, Charcoal #4A4A4A, Sand #C8B09C */

@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: block;
}

:root {
  --off-white: #F7F5F2;
  --black: #1A1A1A;
  --charcoal: #4A4A4A;
  --sand: #C8B09C;
  --error: #B3261E;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "DM Sans", Arial, sans-serif;
  background: var(--off-white);
  color: var(--black);
  /* Kioskläge: ingen markering, ingen dra-och-zooma */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
}

.screen {
  display: none;
  position: fixed;
  inset: 0;
  padding: 4vh 4vw;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4vh;
  text-align: center;
}
.screen.active { display: flex; }

h1 {
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}
h2 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  margin: 0;
}

.logo {
  position: fixed;
  top: 2vh;
  left: 2vw;
  width: clamp(56px, 7vw, 96px);
  height: auto;
  z-index: 2;
  pointer-events: none;
}

/* --- Smileys --- */
.smileys {
  display: flex;
  gap: 3vw;
  justify-content: center;
  width: 100%;
}
.smiley {
  flex: 1 1 0;
  max-width: 22vw;
  background: none;
  border: none;
  padding: 1vw;
  border-radius: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;
  font: inherit;
  color: var(--black);
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.smiley svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}
.smiley span {
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 700;
}
.smiley:active { transform: scale(0.94); }
.smileys.locked .smiley { opacity: 0.35; pointer-events: none; }

/* --- Knappar --- */
.link-button {
  background: none;
  border: 2px solid var(--sand);
  border-radius: 999px;
  padding: 14px 28px;
  font: inherit;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--charcoal);
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 3vw;
  justify-content: center;
  flex-wrap: wrap;
}
.button {
  min-width: 220px;
  min-height: 72px;
  padding: 16px 32px;
  border-radius: 14px;
  font: inherit;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  cursor: pointer;
}
.button.primary {
  background: var(--black);
  color: #FFFFFF;
  border: 2px solid var(--black);
}
.button.secondary {
  background: #FFFFFF;
  color: var(--black);
  border: 2px solid var(--sand);
}
.button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Tackskärm --- */
.thanks-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  flex-wrap: wrap;
}
.qr {
  width: clamp(200px, 26vw, 300px);
  height: auto;
  background: #FFFFFF;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid var(--sand);
}
.thanks-text {
  text-align: left;
  font-size: clamp(20px, 2.6vw, 32px);
  max-width: 34ch;
}
.thanks-text p { margin: 0.3em 0; }
.strong { font-weight: 700; }
.hint {
  color: var(--charcoal);
  font-size: clamp(16px, 1.8vw, 22px);
  margin: 0;
}

/* --- Fritext --- */
#screen-feedback {
  /* Högt upp, eftersom skärmtangentbordet täcker nedre halvan */
  justify-content: flex-start;
  gap: 2.2vh;
  padding-top: 3vh;
}
.categories {
  display: flex;
  gap: 2vw;
  flex-wrap: wrap;
  justify-content: center;
}
.category {
  min-height: 64px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid var(--sand);
  background: #FFFFFF;
  font: inherit;
  font-size: clamp(18px, 2.2vw, 26px);
  color: var(--black);
  cursor: pointer;
}
.category[aria-checked="true"] {
  background: var(--black);
  border-color: var(--black);
  color: #FFFFFF;
  font-weight: 700;
}
textarea {
  width: min(900px, 92vw);
  font: inherit;
  font-size: clamp(18px, 2.2vw, 26px);
  padding: 16px;
  border: 2px solid var(--sand);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--black);
  resize: none;
  -webkit-user-select: text;
  user-select: text;
}
textarea:focus { outline: 3px solid var(--black); outline-offset: 2px; }
.error {
  color: var(--error);
  font-weight: 700;
  margin: 0;
  font-size: clamp(16px, 2vw, 22px);
}

/* --- Stående läge --- */
@media (orientation: portrait) {
  .smileys { flex-wrap: wrap; gap: 4vw; }
  .smiley { flex: 0 0 40vw; max-width: 40vw; }
  .thanks-text { text-align: center; }
}
