/* RC88 · Pannello «Condividi»: stile coerente con le finestre dell'app
   (crema, bruno, oro) e un solo accento estraneo, l'azzurro di Facebook,
   perché il pulsante principale deve essere riconoscibile a colpo d'occhio. */

.share-sheet {
  width: min(460px, calc(100vw - 28px));
  max-height: min(88vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fffaf1;
  color: #322a22;
  box-shadow: 0 30px 80px rgba(43, 28, 15, .34);
  overflow: auto;
  overscroll-behavior: contain;
}

.share-sheet::backdrop {
  background: rgba(31, 22, 15, .5);
  backdrop-filter: blur(3px);
}

.share-sheet-card {
  display: grid;
  gap: 15px;
  padding: 24px 22px 22px;
}

.share-sheet-head {
  display: grid;
  gap: 6px;
}

.share-sheet-eyebrow {
  margin: 0;
  color: #a56a18;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.share-sheet-head h2 {
  margin: 0;
  color: #2c2117;
  font: 900 clamp(1.3rem, 5vw, 1.6rem)/1.1 Georgia, serif;
}

.share-sheet-lead {
  margin: 0;
  color: #6d5f50;
  font-size: .88rem;
  line-height: 1.5;
}

.share-sheet-preview {
  margin: 0;
  border: 1px solid rgba(83, 61, 32, .16);
  border-radius: 16px;
  background: #f3ead9;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.share-sheet-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-sheet-note {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid #28724e;
  border-radius: 0 10px 10px 0;
  background: rgba(40, 114, 78, .09);
  color: #245c40;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.45;
}

.share-sheet-note[data-kind="warn"] {
  border-left-color: #c27824;
  background: rgba(194, 120, 36, .11);
  color: #7d4a0d;
}

.share-sheet-networks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.share-net {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 74px;
  padding: 9px 6px;
  border: 1px solid rgba(83, 61, 32, .18);
  border-radius: 14px;
  background: #fff;
  color: #4a3826;
  cursor: pointer;
  font: 800 .72rem/1.15 system-ui, sans-serif;
  text-align: center;
}

.share-net svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.share-net:hover {
  border-color: rgba(83, 61, 32, .38);
  background: #fffdf8;
  transform: translateY(-1px);
}

.share-net:focus-visible {
  outline: 3px solid rgba(194, 120, 36, .38);
  outline-offset: 2px;
}

/* Facebook è il primo della lista e il più richiesto: resta in evidenza. */
.share-net-facebook {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff;
}

.share-net-facebook:hover {
  border-color: #0f5fc4;
  background: #0f5fc4;
}

.share-sheet-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-sheet-tools button {
  flex: 1 1 150px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(83, 61, 32, .2);
  border-radius: 12px;
  background: #fff;
  color: #4a3826;
  cursor: pointer;
  font: 800 .82rem/1 system-ui, sans-serif;
}

.share-sheet-tools button:hover { background: #fffdf8; }

.share-sheet-tools button:focus-visible {
  outline: 3px solid rgba(194, 120, 36, .34);
  outline-offset: 2px;
}

.share-sheet-tools button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.share-sheet-download {
  border-color: #a56a18 !important;
  background: linear-gradient(135deg, #fff0bd, #f6bf4d 58%, #d88422) !important;
  color: #3f270c !important;
}

.share-sheet-field {
  display: grid;
  gap: 6px;
  color: #5c4326;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.share-sheet-field input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(83, 61, 32, .22);
  border-radius: 11px;
  background: #fff;
  color: #322a22;
  font: 600 .82rem/1.2 system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.share-sheet-field input:focus-visible {
  outline: 3px solid rgba(194, 120, 36, .28);
  border-color: #c27824;
}

.share-sheet-status {
  min-height: 20px;
  margin: 0;
  color: #6d5f50;
  font-size: .82rem;
  font-weight: 750;
}

.share-sheet-status[data-kind="success"] { color: #28724e; }
.share-sheet-status[data-kind="error"] { color: #a53f2c; }

.share-sheet-help {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(83, 61, 32, .14);
  color: #7a6b5c;
  font-size: .78rem;
  line-height: 1.5;
}

.share-sheet-debug {
  min-height: 40px;
  padding: 0 12px;
  border: 1px dashed rgba(83, 61, 32, .3);
  border-radius: 10px;
  background: transparent;
  color: #6e460b;
  cursor: pointer;
  font: 800 .78rem/1 system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-sheet-debug:hover { background: #fff3c9; }

.share-sheet-actions {
  display: flex;
  justify-content: flex-end;
}

.share-sheet-close {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(83, 61, 32, .22);
  border-radius: 12px;
  background: transparent;
  color: #5c4326;
  cursor: pointer;
  font: 850 .86rem/1 system-ui, sans-serif;
}

.share-sheet-close:hover { background: #fff; }

.share-sheet-close:focus-visible {
  outline: 3px solid rgba(194, 120, 36, .34);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .share-sheet-card { padding: 20px 16px 18px; gap: 13px; }
  .share-sheet-networks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-sheet-tools button { flex: 1 1 100%; }
}
