/* Share panel styles, matched to the frame generator's existing look. */
.bs-signin {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid #cfe0f1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f8fd, #ffffff);
}

.bs-signin[hidden] {
  display: none;
}

.bs-signin__intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bs-signin__title {
  color: #2c3e50;
  font-size: 15px;
}

.bs-signin__text {
  color: #5d6d7e;
  font-size: 13px;
  line-height: 1.5;
}

/* The signed-out and signed-in versions share one slot, so the card keeps its height when the
   sign-in check answers. The version not in use stays invisible but still holds its space. */
.bs-signin__swap {
  display: grid;
}

.bs-signin__swap > * {
  grid-area: 1 / 1;
}

.bs-signin__swap > .bs-account {
  align-self: center;
}

.bs-signin[data-state="connected"] [data-when="disconnected"],
.bs-signin:not([data-state="connected"]) [data-when="connected"] {
  visibility: hidden;
}

.bs-signin__status {
  margin: 0;
  color: #5d6d7e;
  font-size: 13px;
  line-height: 1.5;
}

.bs-signin__status:empty {
  display: none;
}

.bs-signin__status.is-error {
  color: #c0392b;
}

.bs-signin__status.is-success {
  color: #1e8449;
}

.bs-signin__status.is-warning {
  font-weight: 700;
}

.bs-share {
  width: 100%;
  margin-top: 10px;
  padding: 24px;
  border: 2px solid #e3f2fd;
  border-radius: 16px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  container-type: inline-size;
}

.bs-share[hidden] {
  display: none;
}

.bs-share__title {
  margin: 0 0 4px;
  color: #2c3e50;
  font-size: 1.25rem;
}

.bs-share__lead {
  margin: 0;
  color: #5d6d7e;
  font-size: 14px;
}

.bs-field__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.bs-field__label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bs-caption {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  color: #2c3e50;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bs-caption:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.bs-field__meta {
  margin-top: 6px;
  font-size: 12px;
  color: #7f8c8d;
  text-align: right;
}

.bs-field__meta.is-over {
  color: #c0392b;
}

.bs-link {
  background: none;
  border: 0;
  padding: 0;
  color: #2471a3;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  align-self: flex-start;
}

.bs-link:hover {
  color: #1a5276;
}

.bs-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: #e6edf5;
}

.bs-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #4a5b6d;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.bs-tab:hover {
  color: #1f2d3d;
}

.bs-tab[aria-selected="true"] {
  background: #fff;
  color: #1f2d3d;
  box-shadow: 0 1px 4px rgba(25, 38, 66, 0.14);
}

.bs-tab[data-tab="linkedin"][aria-selected="true"] svg {
  color: #0a66c2;
}

.bs-tab[data-tab="x"][aria-selected="true"] svg {
  color: #0f1419;
}

.bs-tab[data-tab="whatsapp"][aria-selected="true"] svg {
  color: #1da851;
}

.bs-tab:focus-visible {
  outline: 3px solid rgba(52, 152, 219, 0.45);
  outline-offset: 2px;
}

.bs-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d6e4f0;
  border-radius: 14px;
  background: #fff;
}

.bs-pane[hidden] {
  display: none;
}

.bs-caption--short {
  min-height: 120px;
}

.bs-account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #2c3e50;
}

.bs-account[hidden],
.bs-result[hidden],
.bs-link[hidden],
.bs-btn[hidden] {
  display: none;
}

.bs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.18);
}

.bs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.bs-btn:focus-visible,
.bs-link:focus-visible,
.bs-caption:focus-visible {
  outline: 3px solid rgba(52, 152, 219, 0.45);
  outline-offset: 2px;
}

.bs-btn--linkedin {
  width: 100%;
  background: linear-gradient(135deg, #0a66c2, #004182);
  color: #fff;
}

.bs-btn--linkedin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 102, 194, 0.3);
}

.bs-btn--x {
  width: 100%;
  background: #0f1419;
  color: #fff;
}

.bs-btn--x:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 20, 25, 0.3);
}

.bs-btn--whatsapp {
  width: 100%;
  background: linear-gradient(135deg, #128c7e, #075e54);
  color: #fff;
}

.bs-btn--whatsapp:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(7, 94, 84, 0.3);
}

.bs-btn:disabled {
  cursor: default;
  opacity: 0.65;
}

.bs-linkedin[data-state="publishing"] .bs-btn--linkedin::after,
.bs-x[data-state="publishing"] .bs-btn--x::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bs-spin 0.8s linear infinite;
}

.bs-linkedin[data-state="published"] .bs-btn--linkedin,
.bs-x[data-state="published"] .bs-btn--x {
  background: linear-gradient(135deg, #27ae60, #1e8449);
  opacity: 1;
}

@keyframes bs-spin {
  to {
    transform: rotate(360deg);
  }
}

.bs-hint {
  margin: 0;
  color: #5d6d7e;
  font-size: 13px;
  line-height: 1.5;
}

.bs-hint:empty {
  display: none;
}

.bs-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  background: #e8f5e9;
  color: #1e8449;
  font-size: 14px;
}

.bs-result a {
  color: #0a66c2;
  font-weight: 600;
}

.bs-more__label {
  margin: 0 0 10px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bs-more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.bs-btn--ghost {
  padding: 11px 14px;
  border: 2px solid #d6e4f0;
  background: #fff;
  color: #2c3e50;
  font-size: 14px;
}

.bs-btn--ghost:hover:not(:disabled) {
  border-color: #3498db;
  color: #1f618d;
  transform: translateY(-1px);
}

.bs-status {
  margin: 0;
  min-height: 1.4em;
  color: #5d6d7e;
  font-size: 14px;
}

.bs-status.is-error {
  color: #c0392b;
}

.bs-status.is-success {
  color: #1e8449;
}

.bs-status a {
  margin-left: 4px;
  color: #0a66c2;
  font-weight: 600;
}

/* The panel is often much narrower than the viewport, so the tabs respond to the panel's own width. */
@container (max-width: 440px) {
  .bs-tab {
    flex-direction: column;
    gap: 4px;
    padding: 8px 4px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bs-btn,
  .bs-tab,
  .bs-caption {
    transition: none;
  }

  .bs-linkedin[data-state="publishing"] .bs-btn--linkedin::after,
  .bs-x[data-state="publishing"] .bs-btn--x::after {
    animation-duration: 2s;
  }
}

/* Page footer (credits) on the dark page background below the generator. */
.colophon {
  max-width: 1200px;
  margin: 28px auto 8px;
  color: #c3cee0;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

.colophon__credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.colophon__credits p {
  margin: 0;
}

.colophon__credits p + p::before {
  content: "·";
  margin: 0 10px;
  color: rgba(195, 206, 224, 0.6);
}

.colophon a {
  color: #8ecbff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 203, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.colophon a:hover,
.colophon a:focus-visible {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.colophon a:focus-visible {
  outline: 2px solid rgba(142, 203, 255, 0.6);
  outline-offset: 2px;
}

.colophon__heart {
  color: #ff5c7a;
}

.colophon__version {
  color: rgba(195, 206, 224, 0.75);
  font-variant-numeric: tabular-nums;
}

/* Generator pages: all 16 share one inline stylesheet, and this file loads after it. */
/* Native system fonts come before Verdana, which iPhones otherwise fall back to and which runs very wide. */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .container {
    border-radius: 16px;
  }

  .header {
    padding: 22px 16px 20px;
  }

  .header h1 {
    margin-bottom: 6px;
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .header p {
    font-size: 0.95rem;
  }

  .main-content {
    gap: 24px;
    padding: 20px 16px;
  }

  .form-section {
    gap: 18px;
  }

  .form-group label {
    margin-bottom: 6px;
    font-size: 12px;
  }

  /* 16px keeps iPhones from zooming in when a field gets focus. */
  .form-group input {
    padding: 12px 14px;
    font-size: 16px;
  }

  .form-group .file-upload-label {
    padding: 16px;
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0;
  }

  .file-upload-label small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
  }

  .bs-signin {
    gap: 10px;
    padding: 14px 16px;
  }

  .bs-share {
    gap: 14px;
    padding: 16px;
  }

  .bs-share__title {
    font-size: 1.1rem;
  }

  .bs-pane {
    padding: 14px;
  }

  .colophon {
    margin-top: 20px;
    font-size: 13px;
  }

  /* Too narrow for one line: stack the credits without separators. */
  .colophon__credits {
    flex-direction: column;
    align-items: center;
  }

  .colophon__credits p + p::before {
    content: none;
  }
}