/* ════════════════════════════════════════════════════════
   INGLÉS 360 COMMUNITY BRIDGE — supplemental CSS

   UI Kit owns cards, buttons, badges, notices, progress bars.
   This file only styles share-specific form primitives (pill
   radios, message textarea) + zone/profile card micro-layout.
   All tokens come from UI Kit's tokens.css (--i360-*).
   ════════════════════════════════════════════════════════ */

.i360cb-shell { }

.i360cb-form {
  display: flex;
  flex-direction: column;
  gap: var(--i360-space-4);
}

.i360cb-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.i360cb-fieldset__legend {
  font-family: var(--i360-font-display);
  font-weight: 800;
  font-size: var(--i360-fs-base);
  color: var(--i360-text);
  padding: 0;
  margin: 0;
}

.i360cb-fieldset__hint,
.i360cb-field__hint {
  color: var(--i360-muted);
  font-size: var(--i360-fs-xs);
  line-height: 1.5;
  margin: 0;
}

/* ── Pill radios ─────────────────────────────────── */

.i360cb-pills-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.i360cb-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 200px;
  min-height: 56px;
  padding: 12px 14px;
  background: var(--i360-surface-2);
  border: 1px solid var(--i360-border);
  border-radius: 14px;
  color: var(--i360-text);
  cursor: pointer;
  transition: border-color var(--i360-t), background var(--i360-t), box-shadow var(--i360-t), opacity var(--i360-t);
  user-select: none;
}
.i360cb-pill:hover {
  border-color: rgba(255,255,255,.22);
}
[data-theme="light"] .i360cb-pill:hover {
  border-color: rgba(22,24,42,.20);
}
.i360cb-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.i360cb-pill:has(input[type="radio"]:checked) {
  border-color: transparent;
  background:
    linear-gradient(var(--i360-surface-2), var(--i360-surface-2)) padding-box,
    var(--i360-grad) border-box;
  border: 1px solid transparent;
  box-shadow: var(--i360-shadow-glow);
}

.i360cb-pill[data-disabled="1"] {
  opacity: .45;
  cursor: not-allowed;
}

.i360cb-pill__label {
  font-family: var(--i360-font-display);
  font-weight: 700;
  font-size: var(--i360-fs-sm);
  color: var(--i360-text);
}
.i360cb-pill__desc {
  font-size: var(--i360-fs-xs);
  color: var(--i360-muted);
  line-height: 1.45;
}

/* ── Zone group: show only when visibility == community ── */

/* The zones fieldset hides itself when the community radio isn't
   checked anywhere in the form. Server-side validation still enforces
   the zone field when visibility=community, so if CSS fails the
   backend is still safe. */
.i360cb-form:not(:has(input[name="visibility"][value="community"]:checked)) .i360cb-zones {
  display: none;
}

/* ── Text / textarea ─────────────────────────────── */

.i360cb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.i360cb-field__label {
  font-family: var(--i360-font-display);
  font-weight: 800;
  font-size: var(--i360-fs-base);
  color: var(--i360-text);
}
.i360cb-field__textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--i360-surface-2);
  border: 1px solid var(--i360-border);
  border-radius: var(--i360-input-r);
  color: var(--i360-text);
  font-family: var(--i360-font-body);
  font-size: var(--i360-fs-base);
  line-height: 1.55;
  transition: border-color var(--i360-t), box-shadow var(--i360-t);
  resize: vertical;
  min-height: 120px;
}
.i360cb-field__textarea:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: var(--i360-focus);
}
[data-theme="light"] .i360cb-field__textarea {
  background: var(--i360-surface);
  color: var(--i360-text);
}

/* ── Share form card + actions ───────────────────── */

.i360cb-share__form {
  display: flex;
  flex-direction: column;
  gap: var(--i360-space-4);
}

.i360cb-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--i360-space-3);
  align-items: center;
}

/* ── Pills row (record badges, visibility indicators) ── */

.i360cb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.i360uk-badge.i360cb-badge--visibility {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--i360-border);
  color: var(--i360-muted);
}
.i360uk-badge.i360cb-badge--visibility::before { display: none; }

/* ── Profile view item ───────────────────────────── */

.i360cb-profile-item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--i360-space-3);
  flex-wrap: wrap;
}

/* ── Zone view ───────────────────────────────────── */

.i360cb-zone { }

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

@media (max-width: 480px) {
  .i360cb-pill { flex-basis: 100%; }
  .i360cb-share__actions .i360uk-btn { width: 100%; }
  .i360cb-share__actions { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .i360cb-pill { transition: none; }
}
