/*
 * Arianna Plus Food — integrazione Feed Social V2
 * Foglio additivo: non sostituisce le regole delle offerte già collaudate.
 */

.apf-local-lab-badge {
  position: fixed;
  z-index: 200;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid #85d3ad;
  border-radius: 999px;
  background: #e8fbf2f2;
  color: #087b56;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 7px 24px #07132824;
  backdrop-filter: blur(8px);
}

.apf-local-lab-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18a874;
}

.apf-local-login {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #8fd8b6;
  border-radius: 14px;
  background: linear-gradient(135deg, #effcf6, #f8fffb);
  text-align: left;
}

.apf-local-login strong {
  display: block;
  color: #087b56;
  font-size: 14px;
}

.apf-local-login p {
  margin: 6px 0 12px;
  color: #476556;
  font-size: 11px;
  line-height: 1.5;
}

.apf-local-login button {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: #087b56;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.apf-local-login button:disabled {
  opacity: .65;
  cursor: wait;
}

.apf-stories {
  margin: 14px 0 8px;
  padding: 16px 17px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 24px #2639580b;
}

.apf-stories-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.apf-stories-head small,
.apf-stories-head strong {
  display: block;
}

.apf-stories-head small {
  color: #1768e5;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .1em;
}

.apf-stories-head strong {
  margin-top: 3px;
  color: #172033;
  font-size: 19px;
}

.apf-stories-head > span {
  color: #6a7586;
  font-size: 10px;
}

.apf-stories-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #b9c9dd transparent;
}

.apf-story-bubble,
.apf-story-create {
  flex: 0 0 78px;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #24334a;
  cursor: pointer;
  scroll-snap-align: start;
}

.apf-story-ring {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffbb00, #ff4f2d 45%, #1768e5 82%);
  box-shadow: 0 5px 14px #173f7c24;
}

.apf-story-ring > img,
.apf-story-ring > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1768e5;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  object-fit: cover;
}

.apf-story-create .apf-story-ring {
  position: relative;
  background: #dbe8fb;
}

.apf-story-create .apf-story-ring::after {
  content: "+";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1768e5;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.apf-story-bubble strong,
.apf-story-create strong {
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apf-story-bubble small,
.apf-story-create small {
  color: #788397;
  font-size: 8px;
}

.apf-stories-empty {
  min-width: 270px;
  padding: 14px 16px;
  border: 1px dashed #bdcce0;
  border-radius: 13px;
  color: #66758a;
  font-size: 11px;
  line-height: 1.45;
}

.apf-story-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #061127e8;
}

/* L'attributo hidden deve prevalere sul display:grid del visualizzatore. */
.apf-story-viewer[hidden] {
  display: none !important;
}

.apf-story-shell {
  position: relative;
  width: min(420px, 96vw);
  height: min(760px, 92vh);
  overflow: hidden;
  border-radius: 24px;
  background: #0b1c37;
  box-shadow: 0 30px 100px #000a;
}

.apf-story-media,
.apf-story-media img,
.apf-story-media video {
  width: 100%;
  height: 100%;
}

.apf-story-media img,
.apf-story-media video {
  display: block;
  object-fit: cover;
}

.apf-story-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #07142fa8 0%, transparent 36%, transparent 52%, #07142fe8 100%);
}

.apf-story-progress {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.apf-story-progress i {
  height: 3px;
  overflow: hidden;
  border-radius: 4px;
  background: #ffffff66;
}

.apf-story-progress i.seen {
  background: #fff;
}

.apf-story-progress i.current::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transform-origin: left;
  animation: apf-story-progress 7s linear forwards;
}

@keyframes apf-story-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.apf-story-owner {
  position: absolute;
  z-index: 4;
  top: 28px;
  left: 15px;
  right: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.apf-story-owner:hover strong,
.apf-story-owner:focus-visible strong { text-decoration: underline; }

.apf-story-owner:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .8);
  outline-offset: 4px;
  border-radius: 9px;
}

.apf-story-owner img,
.apf-story-owner > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1768e5;
  font-weight: 950;
  object-fit: cover;
}

.apf-story-owner strong,
.apf-story-owner small {
  display: block;
}

.apf-story-owner strong { font-size: 12px; }
.apf-story-owner small { margin-top: 2px; color: #e5edff; font-size: 9px; }

.apf-story-copy {
  position: absolute;
  z-index: 4;
  left: 20px;
  right: 20px;
  bottom: 22px;
  color: #fff;
}

.apf-story-copy > span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #ffbf00;
  color: #082457;
  font-size: 9px;
  font-weight: 950;
}

.apf-story-copy h2 {
  margin: 10px 0 6px;
  font-size: 26px;
  line-height: 1.08;
}

.apf-story-copy p {
  margin: 0 0 14px;
  color: #edf3ff;
  font-size: 12px;
  line-height: 1.45;
}

.apf-story-copy button,
.apf-story-copy a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 15px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1458ba;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.apf-story-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.apf-story-copy .apf-story-visit {
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(8, 31, 68, .78);
  color: #fff;
  backdrop-filter: blur(8px);
}

.apf-story-copy .apf-story-visit:hover { background: rgba(13, 76, 151, .9); }

@media (max-width: 430px) {
  .apf-story-actions { grid-template-columns: 1fr; gap: 7px; }
  .apf-story-copy button { min-height: 42px; }
}

.apf-story-close,
.apf-story-arrow {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffffde;
  color: #152033;
  cursor: pointer;
}

.apf-story-close {
  top: 25px;
  right: 14px;
  width: 36px;
  height: 36px;
  font-size: 23px;
}

.apf-story-arrow {
  top: 50%;
  width: 40px;
  height: 40px;
  font-size: 25px;
  transform: translateY(-50%);
}

.apf-story-arrow.prev { left: 9px; }
.apf-story-arrow.next { right: 9px; }

.apf-story-publish {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #cfe0f8;
  border-radius: 13px;
  background: #f6faff;
  color: #2f4668;
  font-size: 11px;
  font-weight: 850;
}

.apf-story-publish > span {
  display: grid;
  gap: 3px;
}

.apf-story-publish small {
  color: #68788d;
  font-size: 9px;
  font-weight: 600;
}

.apf-story-publish input {
  width: 21px;
  height: 21px;
  accent-color: #1768e5;
}

.apf-profile-owner-control {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #d9e1eb;
  border-radius: 10px;
  background: #fffffff2;
  color: #172033;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 5px 16px #07132825;
  cursor: pointer;
}

.profile-cover { position: relative; }
.business-profile-head .profile-cover .apf-profile-cover-control { right: 16px; bottom: 14px; }
.business-profile-head .profile-avatar { position: relative; overflow: visible; }
.business-profile-head .profile-avatar > img { border-radius: 50%; }
.business-profile-head .profile-avatar .apf-profile-avatar-control {
  right: -8px;
  bottom: 1px;
  width: 33px;
  min-height: 33px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
}

.apf-profile-saving {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: #071328b8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

/* Rifinitura del pannello locale approvato: composer centrale e comandi leggibili. */
.business-feed > .timeline:has(.manager-composer) {
  padding: 18px;
  border: 1px solid #dfe5ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 6px 22px #2639580b;
}

.business-feed > .timeline:has(.manager-composer) .manager-compose-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.business-feed > .timeline:has(.manager-composer) .manager-compose-actions button:last-child {
  display: none;
}

@media (max-width: 820px) {
  .apf-stories {
    margin: 12px -12px 6px;
    padding: 14px 12px 12px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .apf-stories-head > span { display: none; }
  .apf-stories-rail { gap: 10px; scrollbar-width: none; }
  .apf-stories-rail::-webkit-scrollbar { display: none; }
  .apf-story-bubble,
  .apf-story-create { flex-basis: 70px; }
  .apf-story-ring { width: 62px; height: 62px; }
}

@media (max-width: 620px) {
  .apf-local-lab-badge { right: 8px; bottom: 74px; }
  .apf-story-viewer { padding: 0; }
  .apf-story-shell { width: 100%; height: 100%; border-radius: 0; }
  .apf-story-arrow { width: 36px; height: 36px; }
  .apf-story-copy h2 { font-size: 24px; }

  .business-profile-head .profile-cover .apf-profile-cover-control {
    right: 10px;
    bottom: 10px;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 9px;
  }

  .business-feed > .timeline:has(.manager-composer) .manager-compose-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .apf-story-progress i.current::after { animation: none; transform: scaleX(1); }
}

/* ========================================================================
   V3 · PAGINA DEL LOCALE FEDELE ALLO STANDALONE SOCIALE APPROVATO
   Queste regole riguardano soltanto la route della pagina del locale.
   La home e le schede pubbliche delle offerte restano invariate.
   ======================================================================== */

#viewContent.apf-v3-shop-view {
  width: min(1220px, calc(100% - 28px));
  margin-top: 18px;
}

.apf-v3-owner-view .owner-page-nav[hidden],
.apf-v3-owner-view .business-page-tabs[hidden],
.apf-v3-owner-view .business-sticky-commerce[hidden] {
  display: none !important;
}

.apf-v3-shop-view .business-profile-head {
  overflow: visible;
  border: 1px solid #dbe3ee;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(18,44,86,.08);
}

.apf-v3-shop-view .business-profile-head .profile-cover {
  height: 310px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #082458;
}

.apf-v3-shop-view .business-profile-head .profile-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apf-v3-shop-view .business-profile-head .profile-head {
  min-height: 155px;
  padding: 20px 26px 20px 210px;
  display: flex;
  align-items: center;
}

.apf-v3-shop-view .business-profile-head .profile-avatar {
  position: absolute;
  left: 34px;
  top: -82px;
  width: 150px;
  height: 150px;
  margin: 0;
  border: 6px solid #fff;
  box-shadow: 0 4px 18px rgba(10,31,70,.18);
}

.apf-v3-shop-view .business-profile-head .profile-title {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.apf-v3-shop-view .business-profile-head .profile-title > div {
  min-width: 0;
  flex: 1;
}

.apf-v3-shop-view .business-profile-head .profile-title h1 {
  margin: 0;
  color: #14213a;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.apf-v3-shop-view .business-profile-head .profile-title p {
  margin: 8px 0 0;
  color: #667287;
  font-size: 12px;
}

.apf-v3-edit-profile {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #cbd7e9;
  border-radius: 11px;
  color: #34425a;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.apf-v3-edit-profile:hover {
  color: #0b61d8;
  border-color: #91b7ec;
  background: #f2f7ff;
}

.apf-v3-local-tools {
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 10px;
  display: flex;
  gap: 8px;
  overflow: visible;
  border: 1px solid #c7daf7;
  border-radius: 15px;
  background: #f7faff;
  box-shadow: 0 5px 20px rgba(18,44,86,.045);
}

.apf-v3-local-tools > button,
.apf-v3-more-tools > summary {
  min-height: 42px;
  flex: 1 0 auto;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d7e0ed;
  border-radius: 11px;
  color: #44516a;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.apf-v3-local-tools > button:hover,
.apf-v3-more-tools > summary:hover {
  color: #0b61d8;
  border-color: #9ec0f3;
  background: #eef5ff;
}

.apf-v3-more-tools {
  position: relative;
  flex: 0 0 auto;
}

.apf-v3-more-tools > summary {
  list-style: none;
}

.apf-v3-more-tools > summary::-webkit-details-marker {
  display: none;
}

.apf-v3-more-tools > div {
  position: absolute;
  z-index: 12;
  top: calc(100% + 7px);
  right: 0;
  width: 190px;
  padding: 7px;
  display: grid;
  gap: 4px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(19,39,74,.17);
}

.apf-v3-more-tools > div button {
  min-height: 39px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #42506a;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.apf-v3-more-tools > div button:hover {
  background: #f0f5fc;
}

.apf-v3-shop-view .business-social-layout {
  max-width: 1100px;
  margin: 20px auto 0;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.apf-v3-shop-view .business-sidebar {
  top: 82px;
  gap: 14px;
}

.apf-v3-shop-view .business-side-card,
.apf-v3-shop-view .business-feed-card,
.apf-v3-shop-view .timeline {
  border: 1px solid #dfe5ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(18,44,86,.055);
}

.apf-v3-today-card > div {
  min-height: 42px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf0f5;
  color: #68758a;
  font-size: 11px;
}

.apf-v3-today-card > div strong {
  color: #0b61d8;
  font-size: 17px;
}

.apf-v3-today-card > div .apf-v3-online {
  padding: 5px 8px;
  border-radius: 999px;
  color: #087447;
  background: #e4f8ee;
  font-size: 9px;
}

.apf-v3-google-card {
  color: #fff;
  background: linear-gradient(145deg,#08225b,#0c54c9) !important;
}

.apf-v3-google-card > span {
  color: #69e0ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.apf-v3-google-card h3 {
  margin: 8px 0;
}

.apf-v3-google-card p {
  margin: 0 0 13px;
  opacity: .82;
  color: #fff !important;
  font-size: 11px;
  line-height: 1.5;
}

.apf-v3-google-card button {
  width: 100%;
  min-height: 39px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,.1);
  font-weight: 800;
}

.apf-v3-shop-view .business-feed {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.apf-v3-shop-view .business-feed > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.apf-v3-composer-card {
  padding: 16px !important;
}

.apf-v3-composer-card .manager-composer {
  gap: 10px;
}

.apf-v3-composer-card .manager-composer-main {
  min-height: 48px;
  border-radius: 24px;
  color: #788298;
  background: #f0f3f7;
}

.apf-v3-composer-card .manager-compose-actions {
  margin-top: 13px;
  padding-top: 12px;
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 4px;
  border-top: 1px solid #e8ecf2;
}

.apf-v3-composer-card .manager-compose-actions[hidden] {
  display: none !important;
}

.apf-v3-composer-card .manager-compose-actions button {
  min-height: 44px;
  padding: 7px 6px !important;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #44516a;
  background: transparent;
  font-size: 10px;
}

.apf-v3-composer-card .manager-compose-actions button:hover {
  color: #0b61d8;
  background: #f1f5fb;
}

.apf-v3-composer-card .manager-compose-actions button:last-child {
  display: none !important;
}

.apf-v3-owner-view #ownerInlineEditor {
  order: 2;
  width: 100%;
  margin: 0;
}

.apf-v3-owner-view #ownerInlineEditor:not(:empty) {
  padding: 0;
  border: 0;
  background: transparent;
}

.apf-v3-owner-view #ownerInlineEditor .timeline,
.apf-v3-owner-view #ownerInlineEditor .inline-page-editor {
  margin: 0;
  border-radius: 17px;
}

.apf-v3-offer-feed {
  order: 3;
  width: 100%;
  padding: 16px !important;
  border: 1px solid #dfe5ed !important;
  border-radius: 17px !important;
  background: #fff !important;
  box-shadow: 0 5px 20px rgba(18,44,86,.055) !important;
}

.apf-v3-offer-feed .business-offer-showcase-head {
  padding: 0 88px 12px 0;
}

.apf-v3-shop-view .business-social-section {
  order: 4;
}

.apf-v3-shop-view .business-review-section {
  order: 5;
}

.apf-v3-chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 20, 43, .68);
  backdrop-filter: blur(5px);
}

.apf-v3-chooser-shell {
  position: relative;
  width: min(720px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  padding: 25px;
  border: 1px solid #dce4ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(3, 18, 45, .34);
}

.apf-v3-chooser-shell header {
  padding: 2px 50px 18px 2px;
}

.apf-v3-chooser-shell header > span {
  color: #1768e5;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.apf-v3-chooser-shell h2 {
  margin: 7px 0 4px;
  color: #111f36;
  font-size: clamp(24px, 4vw, 34px);
}

.apf-v3-chooser-shell header p {
  margin: 0;
  color: #6a7587;
  font-size: 13px;
}

.apf-v3-chooser-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #edf1f6;
  color: #4c586a;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.apf-v3-chooser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.apf-v3-chooser-grid > button {
  min-height: 128px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 13px;
  align-content: center;
  padding: 18px;
  border: 1px solid #dce5f1;
  border-radius: 17px;
  background: #f9fbfe;
  color: #16243b;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.apf-v3-chooser-grid > button:hover,
.apf-v3-chooser-grid > button:focus-visible {
  border-color: #1768e5;
  outline: none;
  box-shadow: 0 10px 26px rgba(23, 104, 229, .12);
  transform: translateY(-2px);
}

.apf-v3-chooser-grid i {
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eaf2ff;
  font-style: normal;
  font-size: 22px;
}

.apf-v3-chooser-grid strong {
  align-self: end;
  font-size: 15px;
}

.apf-v3-chooser-grid small {
  align-self: start;
  margin-top: 5px;
  color: #69758a;
  font-size: 11px;
  line-height: 1.35;
}

.apf-v3-radar-card {
  overflow: hidden;
  border-color: #bcd5fb !important;
  background: linear-gradient(145deg, #f7fbff 0%, #edf5ff 100%) !important;
}

.apf-v3-radar-head,
.apf-v3-radar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.apf-v3-radar-kicker {
  color: #1768e5;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}

.apf-v3-radar-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #58708f;
  font-size: 9px;
  font-weight: 850;
}

.apf-v3-radar-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1cbf84;
  box-shadow: 0 0 0 4px rgba(28, 191, 132, .12);
}

.apf-v3-radar-main {
  justify-content: flex-start;
  margin: 14px 0 12px;
}

.apf-v3-radar-visual {
  position: relative;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 1px solid #9fc4fa;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 19%, #c6dcfa 20% 21%, transparent 22% 41%, #c6dcfa 42% 43%, transparent 44%),
    linear-gradient(90deg, transparent 49%, #d4e4fa 50% 51%, transparent 52%),
    linear-gradient(transparent 49%, #d4e4fa 50% 51%, transparent 52%),
    #f7fbff;
}

.apf-v3-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 5deg, rgba(23, 104, 229, .38), transparent 23%, transparent 100%);
  animation: apf-v3-radar-turn 5s linear infinite;
  transform-origin: center;
}

.apf-v3-radar-origin,
.apf-v3-radar-pin {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.apf-v3-radar-origin {
  left: 33px;
  top: 33px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  background: #1768e5;
  box-shadow: 0 0 0 5px rgba(23, 104, 229, .15);
}

.apf-v3-radar-pin {
  top: 17px;
  right: 14px;
  color: #ff5a36;
  font-size: 12px;
  text-shadow: 0 0 0 4px rgba(255, 90, 54, .13);
}

.apf-v3-radar-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.apf-v3-radar-copy strong {
  color: #0e2852;
  font-size: 24px;
  line-height: 1;
}

.apf-v3-radar-copy small {
  color: #60718a;
  font-size: 10px;
  line-height: 1.35;
}

.apf-v3-radar-address {
  display: flex;
  gap: 7px;
  margin: 0 0 12px !important;
  padding-top: 11px;
  border-top: 1px solid #d5e3f5;
  color: #425878 !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
}

.apf-v3-maps-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: #1768e5;
  color: #fff !important;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 15px rgba(23, 104, 229, .18);
}

.apf-v3-maps-button.is-disabled {
  background: #dbe4f0;
  color: #68768a !important;
  box-shadow: none;
}

@keyframes apf-v3-radar-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .apf-v3-radar-sweep { animation: none; }
}

@media (max-width: 1000px) {
  .apf-v3-local-tools {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .apf-v3-more-tools > div {
    position: fixed;
    top: auto;
    right: 18px;
  }

  .apf-v3-shop-view .business-social-layout {
    max-width: 760px;
    grid-template-columns: 1fr;
  }

  .apf-v3-shop-view .business-sidebar {
    position: static;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .apf-v3-shop-view .business-feed {
    order: 1;
  }
}

@media (max-width: 700px) {
  #viewContent.apf-v3-shop-view {
    width: min(100% - 16px, 1220px);
    margin-top: 9px;
  }

  .apf-v3-shop-view .business-profile-head {
    border-radius: 18px;
  }

  .apf-v3-shop-view .business-profile-head .profile-cover {
    height: 210px;
    border-radius: 18px 18px 0 0;
  }

  .apf-v3-shop-view .business-profile-head .profile-head {
    min-height: 185px;
    padding: 69px 16px 16px;
    align-items: flex-start;
  }

  .apf-v3-shop-view .business-profile-head .profile-avatar {
    left: 18px;
    top: -52px;
    width: 106px;
    height: 106px;
  }

  .apf-v3-shop-view .business-profile-head .profile-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .apf-v3-shop-view .business-profile-head .profile-title h1 {
    font-size: 25px;
  }

  .apf-v3-edit-profile {
    align-self: flex-start;
  }

  .apf-v3-local-tools {
    margin-top: 9px;
    padding: 8px;
  }

  .apf-v3-shop-view .business-social-layout {
    margin-top: 12px;
  }

  .apf-v3-shop-view .business-sidebar {
    grid-template-columns: 1fr;
  }

  .apf-v3-composer-card .manager-compose-actions {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }

  .apf-v3-composer-card .manager-compose-actions button {
    justify-content: flex-start;
    padding-left: 10px !important;
  }

  .apf-v3-chooser-shell {
    padding: 20px 16px 16px;
    border-radius: 20px;
  }

  .apf-v3-chooser-grid {
    grid-template-columns: 1fr;
  }

  .apf-v3-chooser-grid > button {
    min-height: 104px;
  }

  .apf-v3-offer-feed .business-offer-showcase-head {
    padding-right: 72px;
  }
}

/* BUSINESS SOCIAL EDITOR V4 */
.apf-v3-chooser-shell {
  width: min(1060px, calc(100vw - 32px));
}

.apf-v3-chooser-shell > header {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px;
  padding-right: 64px;
  text-align: left;
}

.apf-v3-chooser-shell > header h2,
.apf-v3-chooser-shell > header p,
.apf-v3-chooser-shell > header span {
  position: static !important;
  width: auto !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

.apf-v3-chooser-shell > header h2 {
  margin-top: 4px !important;
  margin-bottom: 0 !important;
}

.apf-v3-chooser-shell > header p {
  margin-top: 0 !important;
}

.apf-v3-chooser-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.apf-v3-chooser-group {
  grid-column: 1 / -1;
  margin: 8px 2px 0;
  padding-top: 14px;
  border-top: 1px solid #dce5f2;
  color: #1768e5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
}

.apf-v3-chooser-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.apf-business-social-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px;
  border-radius: 17px;
  background: #edf3fb;
}

.apf-business-social-tabs button {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #526780;
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
}

.apf-business-social-tabs button.active {
  border-color: #8cb9ff;
  background: #fff;
  color: #0b63e5;
  box-shadow: 0 5px 15px rgba(11, 99, 229, .12);
}

.apf-business-title-field {
  display: none;
}

.apf-business-social-mode .apf-business-title-field {
  display: block;
}

.apf-business-kind-label {
  display: inline-flex;
  margin: 12px 20px 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #0865e8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.apf-business-kind-label.story {
  background: #fff3d8;
  color: #965800;
}

.apf-business-post-title {
  margin: 10px 20px 0;
  color: #10213c;
  font-size: 24px;
}

.business-post-native-video {
  overflow: hidden;
  background: #071328;
}

.business-post-native-video video {
  display: block;
  width: 100%;
  max-height: 720px;
  margin: auto;
  background: #071328;
  object-fit: contain;
}

.apf-business-kind-reel {
  width: min(100%, 430px);
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(8, 31, 68, .15);
}

.apf-business-kind-reel .business-post-native-video {
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
}

.apf-business-kind-reel .business-post-native-video video {
  width: 100%;
  height: 100%;
  max-height: none;
}

@media (max-width: 780px) {
  .apf-v3-chooser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 540px) {
  .apf-v3-chooser-shell {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    overflow-y: auto;
  }

  .apf-v3-chooser-grid {
    grid-template-columns: 1fr !important;
  }

  .apf-v3-chooser-grid > button {
    min-height: 106px;
  }

  .apf-business-social-tabs button {
    min-height: 46px;
    font-size: 15px;
  }

  .apf-business-kind-reel {
    width: 100%;
    border-radius: 18px;
  }
}
/* BUSINESS SOCIAL V4 HEADER FIX */
.apf-v3-chooser-shell > header {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 0 64px 20px 2px !important;
  border-bottom: 1px solid #dce5f2;
  overflow: visible !important;
}

.apf-v3-chooser-shell > header p {
  display: block !important;
  position: static !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  line-height: 1.45 !important;
}

.apf-v3-chooser-group:first-child {
  margin-top: 4px !important;
}

.apf-v3-chooser-close {
  z-index: 10 !important;
  color: #49627d !important;
  font-size: 29px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
/* BUSINESS SOCIAL V4 EDITOR FIX */
.modal.apf-business-social-mode .apf-business-title-field {
  display: block !important;
}

.modal.apf-business-social-mode .apf-business-social-tabs {
  display: grid !important;
}

.apf-business-social-tabs {
  width: 100%;
  box-sizing: border-box;
}

.apf-story-publish[hidden] {
  display: none !important;
}

.apf-v3-chooser-close {
  font-size: 0 !important;
  text-indent: 0 !important;
}

.apf-v3-chooser-close::before {
  content: "×";
  display: block;
  color: #49627d;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
}
/* BUSINESS STORY VERTICALE RESPONSIVE V1 */
.apf-business-kind-story {
  width: min(100%, 430px);
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(8, 31, 68, .15);
}

.apf-business-kind-story .business-post-media {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  padding: 0 !important;
  background: radial-gradient(circle at 50% 35%, #172d4c, #050b14 72%);
}

.apf-business-kind-story .business-post-media button {
  width: 100%;
  height: auto !important;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  background: transparent;
}

.apf-business-kind-story .business-post-media button:not(:first-child) {
  display: none;
}

.apf-business-kind-story .business-post-media img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  background: transparent;
}

@media (max-width: 540px) {
  .apf-business-kind-story {
    width: 100%;
    border-radius: 18px;
  }
}
/* BUSINESS STORY WIDTH CLAMP V1 */
.apf-v3-shop-view .business-social-slide > .apf-business-kind-story,
.apf-v3-shop-view .apf-business-kind-story {
  width: 100% !important;
  max-width: 430px !important;
  justify-self: center;
  margin-right: auto !important;
  margin-left: auto !important;
}

@media (max-width: 540px) {
  .apf-v3-shop-view .business-social-slide > .apf-business-kind-story,
  .apf-v3-shop-view .apf-business-kind-story {
    max-width: 100% !important;
  }
}
/* BUSINESS STORY IMAGE SCALE FIX V1 */
.apf-v3-shop-view .apf-business-kind-story .business-post-media img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}
/* BUSINESS REEL WIDTH CLAMP V1 */
.apf-v3-shop-view .business-social-slide > .apf-business-kind-reel,
.apf-v3-shop-view .apf-business-kind-reel {
  width: 100% !important;
  max-width: 430px !important;
  justify-self: center;
  margin-right: auto !important;
  margin-left: auto !important;
}

@media (max-width: 540px) {
  .apf-v3-shop-view .business-social-slide > .apf-business-kind-reel,
  .apf-v3-shop-view .apf-business-kind-reel {
    max-width: 100% !important;
  }
}
/* BUSINESS SOCIAL CHOOSER VISIBLE CLOSE V1 */
.apf-v3-chooser-close {
  display: grid !important;
  place-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #e8eef7 !important;
  border: 1px solid #cbd7e6 !important;
  box-shadow: 0 3px 12px rgba(8,31,68,.16) !important;
  font-size: 0 !important;
}

.apf-v3-chooser-close::before {
  content: "X" !important;
  display: block !important;
  color: #17365d !important;
  font-size: 21px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.apf-v3-chooser-close:hover {
  background: #dbe6f4 !important;
}

/* FIX V7: X di chiusura sempre visibile. */
.apf-v3-chooser-close{z-index:100!important;color:#17365d!important;font-size:24px!important;font-weight:900!important;line-height:1!important}.apf-v3-chooser-close::before{display:none!important;content:none!important}

/* APF_V4_REAL_STORY_PREVIEWS */
.apf-story-bubble .apf-story-ring > video,
.apf-story-bubble .apf-story-ring > img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}
.apf-story-bubble .apf-story-ring > video {
  background:#e8eef6;
  pointer-events:none;
}

/* REEL V3 - VIDEO INTERO NEL RIQUADRO */
.apf-v3-shop-view .apf-business-kind-reel .business-post-native-video {
  display: block !important;
  width: 100% !important;
  height: min(560px, 56vh) !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  background: #000;
}

.apf-v3-shop-view .apf-business-kind-reel .business-post-native-video video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: #000;
}

@media (min-width: 1001px) {
  .apf-v3-shop-view .business-social-slide > .apf-business-kind-reel,
  .apf-v3-shop-view .apf-business-kind-reel {
    justify-self: start;
    margin-left: 0 !important;
    margin-right: auto !important;
  }
}

@media (max-width: 1000px) {
  .apf-v3-shop-view .apf-business-kind-reel .business-post-native-video {
    height: 70vh !important;
    height: 70dvh !important;
  }
}