/*
 * Share composer
 * --------------
 * The paste box, its options row and its Create button.
 *
 * Extracted from index-custom.css so the same component can be rendered on the
 * account dashboard. A signed-in user should not have to travel back to the
 * marketing homepage to create a share.
 *
 * The base component makes no assumption about placement. Two variants:
 *   .is-hero      homepage, centred and lifted off the page
 *   .is-embedded  inside a dashboard .panel, which supplies the chrome
 *
 * The controls themselves (.share-form, .form-options, .burn-toggle-wrapper,
 * .toggle-switch, .pro-badge, the tooltip) live in style.css and are shared by
 * both surfaces, so nothing here duplicates them.
 */
.composer {
  background: var(--zh-surface);
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius-card);
  overflow: hidden;
}
.composer.is-hero {
  max-width: 920px;
  margin: 0 auto;
  box-shadow: var(--zh-shadow-lg);
}
/* The panel already draws a surface, a border and a radius. Drawing them
   twice reads as a box inside a box. */
.composer.is-embedded {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--zh-space-5) var(--zh-space-5) 0;
}
.composer-label {
  font-size: var(--zh-text-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zh-muted);
}
/* Live byte count against the 1 MB API limit. Tabular figures so the number
   does not shift the row as it changes. */
.composer-size {
  font-family: var(--zh-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--zh-text-micro);
  color: var(--zh-muted);
}
.composer-size.is-over {
  color: var(--zh-danger-text);
  font-weight: 600;
}
.composer .share-form {
  padding: var(--zh-space-3) 0 0;
}
.composer .share-form textarea {
  width: 100%;
  min-height: 168px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 0 var(--zh-space-5) var(--zh-space-4);
  font-family: var(--zh-font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--zh-ink);
  background: transparent;
}
.composer .share-form textarea::placeholder {
  color: #A0AEC0;
}
.composer .form-options {
  display: flex;
  align-items: center;
  gap: var(--zh-space-2);
  flex-wrap: wrap;
  margin: 0;
  padding: var(--zh-space-3) var(--zh-space-3);
  border-top: 1px solid var(--zh-border-soft);
  background: var(--zh-bg-subtle);
}
.composer .form-options select,
.composer .form-options input[type="password"],
.composer .form-options input[type="text"] {
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: var(--zh-radius-ctl);
}
.composer .burn-toggle-wrapper {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--zh-border);
  border-radius: var(--zh-radius-ctl);
  background: var(--zh-surface);
}
.composer-submit {
  margin-left: auto;
  height: 44px;
  padding: 0 22px;
}
/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 768px) {
  .composer-head {
    padding: var(--zh-space-4) var(--zh-space-4) 0;
  }
  .composer .share-form textarea {
    min-height: 104px;
    padding-left: var(--zh-space-4);
    padding-right: var(--zh-space-4);
  }
  /* style.css switches .form-options to flex-direction: column on mobile, which
     makes flex-basis size the MAIN axis, i.e. height. That stretched the expiry
     select to ~160px tall. Keep it a wrapping row here instead. */
  .composer .form-options {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zh-space-2);
    padding: var(--zh-space-2);
  }
  .composer .form-options select,
  .composer .form-options input[type="password"] {
    flex: 1 1 46%;
    width: auto;
    min-width: 0;
    height: 44px;
  }
  .composer .burn-toggle-wrapper {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .composer-submit {
    flex: 1 1 100%;
    margin-left: 0;
    height: 48px;
  }
}
