/* ══════════════════════════════════════════════
   IDIOMASOFÍA® — COMPLAINTS FORM
   styles.css
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700&display=swap');

/* ── Reset & variables ──────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sky:          #3BAEE8;
  --sky-dark:     #1a85c4;
  --sky-light:    #e8f5fc;
  --orange:       #FF7E36;
  --orange-light: #fff3ec;
  --dark:         #12304a;
  --muted:        #5a7a94;
  --border:       #c8dce8;
  --surface:      #f8fafc;
  --white:        #ffffff;
  --danger:       #c0392b;
  --success:      #1a7a4a;
  --radius-lg:    14px;
  --radius-md:    10px;
  --radius-sm:    8px;
  --font-h:       'Fredoka One', cursive;
  --font-b:       'Nunito', sans-serif;
  --shadow-sm:    0 2px 8px rgba(18,48,74,.08);
  --shadow-md:    0 4px 16px rgba(18,48,74,.12);
}

body {
  background: #ddeef8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 0;
  font-family: var(--font-b);
}

#app-root {
  width: 100%;
  max-width: 700px;
  flex-shrink: 0;
}

#idiomasofia-footer-mount {
  width: 100%;
  margin-top: 2rem;
  flex-shrink: 0;
}

/* ── Card shell ─────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ── Header ─────────────────────────────────── */
.c-header {
  background: linear-gradient(135deg, #1a85c4 0%, #3BAEE8 60%, #5ec9f0 100%);
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.c-header::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.c-header::after {
  content: ''; position: absolute; bottom: -25px; left: 60px;
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(255,126,54,.15);
}
.c-header__logo-row {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: .5rem; position: relative;
}
.c-header__logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); color: var(--sky-dark);
  font-size: 1rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  overflow: hidden;
}
.c-header__logo img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
}
.c-header__logo:has(img) {
  display: block;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.c-header__brand { font-family: var(--font-h); color: var(--white); font-size: 1.15rem; }
.c-header__title {
  font-family: var(--font-h); color: var(--white);
  font-size: 1.65rem; line-height: 1.2; position: relative;
}
.c-header__sub { color: rgba(255,255,255,.8); font-size: .85rem; margin-top: .3rem; position: relative; }
.c-header__bar { height: 5px; background: linear-gradient(90deg, var(--orange), #ffaa6e); }

/* ── Body padding ───────────────────────────── */
.c-body { padding: 1.75rem; }

/* ── Steps indicator ────────────────────────── */
.steps {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 1.75rem;
}
.step { display: flex; align-items: center; gap: 6px; flex: 1; }
.step__dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--muted);
  background: var(--white); flex-shrink: 0; transition: all .25s;
}
.step__dot--active { border-color: var(--sky); background: var(--sky); color: var(--white); }
.step__dot--done   { border-color: var(--sky); background: var(--sky-light); color: var(--sky-dark); }
.step__label { font-size: .73rem; color: var(--muted); font-weight: 600; }
@media (max-width: 420px) { .step__label { display: none; } }
.step__line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; transition: background .3s; }
.step__line--done { background: var(--sky); }

/* ── Section title ──────────────────────────── */
.section-title {
  font-family: var(--font-h); color: var(--dark);
  font-size: 1.12rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
}

/* ── Type cards ─────────────────────────────── */
.type-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 1rem; }
@media (max-width: 480px) { .type-cards { grid-template-columns: 1fr; } }

.type-card {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem .9rem; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--white);
}
.type-card:hover {
  border-color: var(--sky); background: var(--sky-light);
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.type-card--selected {
  border-color: var(--sky); background: var(--sky-light);
  box-shadow: var(--shadow-sm);
}
.type-card__icon  { font-size: 1.7rem; margin-bottom: .4rem; }
.type-card__title { font-weight: 700; font-size: .82rem; color: var(--dark); line-height: 1.3; }
.type-card__desc  { font-size: .72rem; color: var(--muted); margin-top: .25rem; line-height: 1.35; }
.type-card__badge {
  display: none; align-items: center; justify-content: center;
  gap: 5px; background: var(--orange-light); border: 1px solid #ffd4b3;
  border-radius: 20px; padding: .25rem .7rem;
  font-size: .73rem; font-weight: 700; color: var(--orange); margin-top: .6rem;
}
.type-card--selected .type-card__badge { display: flex; }

/* ── Anonymous toggle ───────────────────────── */
.anon-toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--orange-light); border: 1px solid #ffd4b3;
  border-radius: var(--radius-md); padding: .85rem 1rem;
  margin-bottom: 1rem; cursor: pointer; user-select: none;
}
.anon-toggle__label { font-size: .87rem; font-weight: 700; color: var(--dark); }
.anon-toggle__sub   { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.toggle-btn {
  width: 44px; height: 25px; border-radius: 13px;
  background: var(--border); position: relative;
  transition: background .2s; flex-shrink: 0;
}
.toggle-btn--on { background: var(--orange); }
.toggle-btn::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--white); transition: left .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-btn--on::after { left: 22px; }

/* ── Form fields ────────────────────────────── */
.field-group { margin-bottom: 1rem; }
.field-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

label {
  display: block; font-size: .83rem; font-weight: 700;
  color: var(--dark); margin-bottom: .38rem;
}
input, textarea, select {
  width: 100%; padding: .65rem .8rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: .88rem; color: var(--dark);
  transition: border .2s, box-shadow .2s; background: var(--white);
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59,174,232,.12);
}
textarea { resize: vertical; min-height: 105px; line-height: 1.55; }

/* ── Role chips ─────────────────────────────── */
.role-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: .38rem .9rem; border: 1.5px solid var(--border);
  border-radius: 20px; font-size: .81rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all .2s;
  background: var(--white); user-select: none;
}
.chip:hover  { border-color: var(--sky); color: var(--sky-dark); }
.chip--selected { border-color: var(--sky); background: var(--sky); color: var(--white); }

/* ── File upload ────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 1.2rem; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--surface);
  position: relative;
}
.file-drop:hover, .file-drop--active {
  border-color: var(--sky); background: var(--sky-light);
}
.file-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.file-drop__icon  { font-size: 1.8rem; margin-bottom: .4rem; }
.file-drop__label { font-size: .83rem; color: var(--muted); }
.file-drop__hint  { font-size: .75rem; color: var(--border); margin-top: .2rem; }
.file-list        { margin-top: .75rem; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .5rem .75rem;
  font-size: .8rem; color: var(--dark);
}
.file-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item__size { color: var(--muted); font-size: .75rem; margin: 0 .5rem; flex-shrink: 0; }
.file-item__rm   { color: var(--danger); cursor: pointer; font-size: .9rem; flex-shrink: 0; border: none; background: none; }
.file-error      { color: var(--danger); font-size: .78rem; margin-top: .4rem; }

/* ── Checkboxes ─────────────────────────────── */
.check-row {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 1rem; cursor: pointer; user-select: none;
}
.check-box {
  width: 21px; height: 21px; border: 2px solid var(--border);
  border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; margin-top: 1px;
}
.check-box--checked { background: var(--sky); border-color: var(--sky); }
.check-box--checked::after { content: '✓'; color: var(--white); font-size: .78rem; font-weight: 700; }
.check-label { font-size: .83rem; color: var(--dark); line-height: 1.45; }

/* ── Summary box ─────────────────────────────── */
.summary-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.1rem;
  margin-bottom: 1rem; font-size: .84rem; line-height: 1.95; color: var(--dark);
}

/* ── Info notes ─────────────────────────────── */
.note {
  border-radius: var(--radius-sm); padding: .8rem 1rem;
  font-size: .79rem; display: flex; gap: 9px;
  align-items: flex-start; margin-top: .6rem;
}
.note--drive  { background: #f0f8ff; border: 1px solid #b8daf5; color: #1a5a8a; }
.note--email  { background: var(--orange-light); border: 1px solid #ffd4b3; color: #a0522d; }
.note--warn   { background: #fff8e1; border: 1px solid #ffe082; color: #7a5c00; }
.note--danger { background: #fdf0f0; border: 1px solid #f5c6c6; color: var(--danger); }

/* ── Buttons ─────────────────────────────────── */
.btn-row {
  display: flex; gap: 10px;
  justify-content: flex-end; margin-top: 1.5rem;
}
.btn {
  padding: .68rem 1.6rem; border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: .9rem; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s;
}
.btn--back {
  background: var(--white); border: 1.5px solid var(--border); color: var(--muted);
}
.btn--back:hover { border-color: var(--sky); color: var(--sky); }
.btn--next {
  background: var(--sky); color: var(--white);
  box-shadow: 0 3px 10px rgba(59,174,232,.3);
}
.btn--next:hover    { background: var(--sky-dark); }
.btn--next:disabled { background: var(--border); box-shadow: none; cursor: not-allowed; }
.btn--submit {
  background: linear-gradient(135deg, var(--orange), #ff9a5c);
  color: var(--white); box-shadow: 0 3px 10px rgba(255,126,54,.3);
}
.btn--submit:hover    { opacity: .9; }
.btn--submit:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary {
  background: var(--sky); color: var(--white);
  box-shadow: 0 3px 10px rgba(59,174,232,.3); font-size: 1rem;
  padding: .8rem 2.2rem;
}
.btn--primary:hover { background: var(--sky-dark); }
.btn--outline {
  background: var(--white); border: 1.5px solid var(--sky);
  color: var(--sky); font-size: .88rem;
}
.btn--outline:hover { background: var(--sky-light); }

/* ── Captcha ─────────────────────────────────── */
.captcha-wrap {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 1.1rem;
  margin-bottom: 1rem;
}
.captcha-title { font-size: .83rem; font-weight: 700; color: var(--dark); margin-bottom: .6rem; }
.captcha-row   { display: flex; align-items: center; gap: 12px; }
.captcha-challenge {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: .5rem 1rem;
  font-family: 'Courier New', monospace; font-size: 1.1rem;
  font-weight: 700; color: var(--dark); letter-spacing: 2px;
  user-select: none; flex-shrink: 0;
}
.captcha-input {
  width: 90px; flex-shrink: 0;
  text-align: center; font-size: 1rem; font-weight: 700;
}
.captcha-refresh {
  background: none; border: none; cursor: pointer;
  color: var(--sky); font-size: 1.2rem; padding: .3rem;
  transition: transform .3s;
}
.captcha-refresh:hover { transform: rotate(180deg); }
.captcha-ok   { color: var(--success); font-size: .8rem; font-weight: 700; }
.captcha-err  { color: var(--danger);  font-size: .8rem; font-weight: 700; }

/* ── Loading ─────────────────────────────────── */
.loading-box   { text-align: center; padding: 2.5rem 1rem; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--sky-light);
  border-top: 3px solid var(--sky);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-family: var(--font-h); font-size: 1.1rem; color: var(--dark); margin-bottom: .5rem; }
.l-steps       { margin-top: 1.2rem; text-align: left; max-width: 280px; margin-left: auto; margin-right: auto; }
.l-step {
  display: flex; align-items: center; gap: 9px;
  font-size: .83rem; padding: .32rem 0; color: var(--muted); transition: color .3s;
}
.l-step--active { color: var(--dark); font-weight: 700; }
.l-step--done   { color: var(--sky-dark); }
.l-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; transition: all .3s;
}
.l-dot--done   { background: var(--sky); border-color: var(--sky); color: var(--white); }
.l-dot--active { border-color: var(--sky); animation: pulse .9s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Success / Error ─────────────────────────── */
.result-box  { text-align: center; padding: 2rem 1rem; }
.result-icon { font-size: 3.2rem; margin-bottom: .75rem; }
.result-title { font-family: var(--font-h); font-size: 1.5rem; color: var(--dark); margin-bottom: .5rem; }
.result-title--err { color: var(--danger); }
.result-sub  { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.folio-badge {
  background: var(--sky-light); border: 1px solid #a8d8f0;
  border-radius: var(--radius-sm); padding: .55rem 1.2rem;
  font-size: .85rem; color: var(--sky-dark); font-weight: 700;
  display: inline-block; margin-bottom: .75rem;
}
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 1rem 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .45rem 1rem; border-radius: 20px; font-size: .8rem; font-weight: 700;
}
.pill--drive  { background: var(--sky-light); color: var(--sky-dark); border: 1px solid #a8d8f0; }
.pill--email  { background: var(--orange-light); color: var(--orange); border: 1px solid #ffd4b3; }
.pill--folder { background: #f0faf5; color: var(--success); border: 1px solid #a8d8c0; }
.doc-btn {
  display: inline-block; margin-top: .75rem; padding: .65rem 1.6rem;
  background: var(--sky); color: var(--white); border-radius: var(--radius-sm);
  font-weight: 700; font-size: .88rem; text-decoration: none;
  box-shadow: 0 3px 10px rgba(59,174,232,.3);
}

/* ── Terms screen ────────────────────────────── */
.terms-header { margin-bottom: 1.25rem; }
.terms-body {
  max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.1rem 1.25rem;
  font-size: .84rem; line-height: 1.8; color: var(--dark);
  margin-bottom: 1.25rem;
}
.terms-body h3 {
  font-family: var(--font-h); color: var(--sky-dark);
  font-size: .95rem; margin: .9rem 0 .3rem;
}
.terms-body h3:first-child { margin-top: 0; }
.terms-body p, .terms-body li { color: var(--muted); }
.terms-body ul { padding-left: 1.2rem; }
.terms-scroll-hint {
  text-align: center; font-size: .75rem; color: var(--muted);
  margin-bottom: .5rem;
}
