/* ============================================================
   feedback.css — SKTH Distributor Meet Feedback Form
   ============================================================ */

:root {
  --red:    #D71920;
  --navy:   #142850;
  --cream:  #faf8f4;
  --ink:    #21262f;
  --muted:  #667080;
  --line:   #e4e0d6;
  --green:  #1fa855;
  --f-sans: 'Inter', Arial, sans-serif;
  --f-disp: 'Cormorant Garamond', Georgia, serif;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(20,40,80,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--f-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 48px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.brand img {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  object-fit: contain;
}
.brand span {
  font-family: var(--f-disp);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 400;
  opacity: .7;
}

.back-link {
  color: #ffffffbb;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #ffffff44;
  border-radius: 30px;
  padding: 7px 14px;
  transition: background .2s;
}
.back-link:hover { background: #ffffff22; }

/* ── Page wrap ───────────────────────────────────────────── */
.page-wrap {
  max-width: 820px;
  margin: 36px auto 72px;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ── Intro ───────────────────────────────────────────────── */
.intro {
  margin-bottom: 32px;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.intro h1 {
  font-family: var(--f-disp);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 10px;
}
.intro p {
  color: var(--muted);
  max-width: 560px;
}

/* ── Form sections ───────────────────────────────────────── */
.form-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px);
  margin-bottom: 20px;
}

.form-section h2 {
  font-family: var(--f-disp);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.form-section h2 span[lang="ta"] {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

.section-hint {
  font-size: 13px;
  color: var(--muted);
  margin: -10px 0 16px;
}

/* ── Field grid ──────────────────────────────────────────── */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field-grid label,
.full-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.field-grid label em,
.full-field em { color: var(--red); font-style: normal; }

.field-grid input,
.full-field input,
.full-field textarea {
  font-family: var(--f-sans);
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--cream);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field-grid input:focus,
.full-field input:focus,
.full-field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215,25,32,.1);
}
.full-field { margin-top: 16px; }
.full-field textarea { resize: vertical; min-height: 80px; }

/* ── Ratings table ───────────────────────────────────────── */
.rating-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.rating-head, .rating-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
}
.category-table .rating-head,
.category-table .rating-row {
  grid-template-columns: 2fr 1fr 2fr 1fr;
}
.rating-head {
  background: #f5f2ec;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 10px 14px;
}
.rating-head span, .rating-row span,
.rating-row strong { padding: 0 4px; }
.rating-row {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.rating-row:nth-child(even) { background: #faf9f7; }
.rating-row strong { font-size: 14px; color: var(--ink); }
.rating-row label {
  display: flex;
  justify-content: center;
  cursor: pointer;
}
.rating-row input[type="radio"] {
  width: 17px; height: 17px;
  accent-color: var(--red);
  cursor: pointer;
}

/* ── Choice fieldset ─────────────────────────────────────── */
.choice-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.choice-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 6px;
}
.choice-fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 6px 0;
  cursor: pointer;
}
.choice-fieldset input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--red);
}

/* ── Media upload ────────────────────────────────────────── */
.media-section small { color: var(--muted); font-size: 12px; display: block; margin-top: 6px; }
.upload-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.upload-control input[type="file"] {
  font-family: var(--f-sans);
  font-size: 13px;
  padding: 8px;
  border: 1.5px dashed var(--line);
  border-radius: 7px;
  background: var(--cream);
  cursor: pointer;
}
.upload-control input[type="file"]:focus { outline: 2px solid var(--red); }
.file-name { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 18px; }

/* ── Submit ──────────────────────────────────────────────── */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
}

#submitBtn {
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 36px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
#submitBtn:hover   { background: #b5181e; }
#submitBtn:active  { transform: scale(.98); }
#submitBtn:disabled { opacity: .6; cursor: not-allowed; }

#formStatus { font-size: 14px; min-height: 20px; }
#formStatus.success { color: var(--green); }
#formStatus.error   { color: var(--red); }

/* ── Thank you note ──────────────────────────────────────── */
.thanks {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 32px;
}

/* ── Screen reader only ──────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet — 768px and below */
@media (max-width: 768px) {
  /* Header */
  .site-header { padding: 12px 16px; }
  .brand span  { font-size: 17px; }
  .back-link   { font-size: 12px; padding: 6px 11px; }

  /* Page */
  .page-wrap { margin: 24px auto 48px; }

  /* Field grid: single column on tablet too */
  .field-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Section headings — wrap Tamil text nicely */
  .form-section h2 {
    font-size: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
  }
  .form-section h2 span[lang="ta"] {
    font-size: 13px;
    margin-left: 0;
    width: 100%;
  }

  /* Ratings table — stack into card style */
  .rating-table { border: none; border-radius: 0; overflow: visible; }

  .rating-head { display: none; } /* hide column headers */

  .rating-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
  }
  .rating-row:nth-child(even) { background: #faf9f7; }

  .rating-row strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    display: block;
    margin-bottom: 4px;
  }

  /* Radio buttons in a row with labels */
  .rating-row label {
    justify-content: flex-start;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
  }
  .rating-row label::after {
    content: attr(data-label);
  }

  /* Show radio option labels on mobile */
  .rating-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  /* Put radio buttons in a horizontal row */
  .rating-row > label {
    display: inline-flex;
  }

  /* Wrap all radio options in a flex row */
  .rating-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0;
  }
  .rating-row strong {
    width: 100%;
    margin-bottom: 8px;
  }
  .rating-row label {
    flex: 1 1 auto;
    min-width: 60px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    text-align: center;
    color: var(--muted);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 4px;
    margin: 2px;
    cursor: pointer;
  }
  .rating-row input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  /* Show radio labels using sr-only content as visible text on mobile */
  .rating-row .sr-only {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
    overflow: visible;
    margin: 0;
    font-size: 11px;
    color: var(--muted);
  }

  /* Category table same treatment */
  .category-table .rating-head { display: none; }
  .category-table .rating-row  { flex-wrap: wrap; }

  /* Choice fieldset */
  .choice-fieldset label { font-size: 14px; padding: 8px 0; }

  /* Submit button full width */
  #submitBtn { width: 100%; padding: 15px; font-size: 15px; }

  /* Form actions centered */
  .form-actions { align-items: stretch; }
}

/* Mobile — 480px and below */
@media (max-width: 480px) {
  /* Header — hide brand text if too narrow */
  .brand small { display: none; }
  .brand span  { font-size: 15px; }
  .back-link   { font-size: 11px; padding: 5px 10px; }

  /* Tighter spacing */
  .intro { margin-bottom: 20px; }
  .form-section { padding: 16px; margin-bottom: 14px; }
  .form-section h2 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; }

  /* Inputs */
  .field-grid input,
  .full-field input,
  .full-field textarea { font-size: 16px; } /* prevent iOS zoom on focus */

  /* Radio option cards slightly smaller */
  .rating-row label { min-width: 52px; padding: 6px 2px; font-size: 10px; }
  .rating-row input[type="radio"] { width: 16px; height: 16px; }

  /* Thanks note */
  .thanks { font-size: 12px; }
}
