/* OVERLAY */
#acg-root {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  font-family: Arial, sans-serif;
}

/* BANNER FULL WIDTH */
#acg-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

/* BOX INTERNO */
.acg-banner__shell {
  width: 100%;
  background: #fff;
  padding: 30px 40px;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

/* LAYOUT */
.acg-banner__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

/* TESTO */
.acg-banner__text {
  flex: 1;
  max-width: 700px;
  margin: 0 auto;
}

.acg-banner__title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #222 !important;
  margin-bottom: 14px;
}

.acg-banner__description {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #333;
}

.acg-banner__links {
  margin-top: 10px;
}

/* LINK */
.acg-link {
  color: #1b82d6 !important;
  text-decoration: underline;
  font-weight: 600;
}

.acg-details {
  color: #1b82d6;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

/* BOTTONI BANNER */
.acg-banner__actions {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acg-btn {
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
}

/* PRIMARY */
.acg-btn--primary {
  background: #1b82d6;
  border: 1px solid #1b82d6;
  color: #fff;
}

.acg-btn--primary:hover {
  background: #166bb3;
  border-color: #166bb3;
}

/* SECONDARY */
.acg-btn--secondary {
  background: #fff;
  border: 1px solid #1b82d6;
  color: #1b82d6;
}

.acg-btn--secondary:hover {
  background: rgba(27, 130, 214, 0.08);
}

/* GHOST */
.acg-btn--ghost {
  background: #f2f2f2;
  border: 1px solid #ddd;
  color: #333;
}

.acg-btn--ghost:hover {
  background: #e9e9e9;
}

/* MODAL */
#acg-modal {
  display: none;
}

#acg-modal.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.acg-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.acg-modal__dialog {
  position: relative;
  width: calc(100% - 40px);
  max-width: 760px;
  margin: 60px auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  color: #111;
}

.acg-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.acg-modal__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.acg-modal__intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* BODY */
.acg-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acg-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid #ececec;
}

.acg-category:last-child {
  border-bottom: 0;
}

.acg-category__content {
  flex: 1 1 auto;
}

.acg-category__title {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.acg-category__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #666;
}

.acg-category--required {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 16px;
  border-bottom: 0;
}

.acg-badge {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

/* SWITCH */
.acg-switch-wrap {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.acg-switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.acg-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  background: #d8d8d8;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.acg-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.acg-switch__input:checked + .acg-switch {
  background: #1b82d6;
}

.acg-switch__input:checked + .acg-switch::after {
  transform: translateX(20px);
}

/* FOOTER MODAL */
.acg-modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.acg-modal__footer .acg-btn {
  flex: 1 1 0;
  min-width: 0;
}

/* MOBILE */
@media (max-width: 768px) {
  .acg-banner__shell {
    padding: 16px 14px;
  }

  .acg-banner__content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .acg-banner__text {
    max-width: none;
    margin: 0;
  }

  .acg-banner__title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .acg-banner__description {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .acg-banner__actions {
    width: 100%;
    gap: 8px;
  }

  .acg-btn {
    width: 100%;
    min-height: 42px;
    font-size: 14px;
  }

  .acg-modal__dialog {
    width: calc(100% - 16px);
    max-width: none;
    margin: 8px auto;
    padding: 16px 16px 90px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acg-modal__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .acg-modal__body {
    gap: 10px;
  }

  .acg-category {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .acg-category__title {
    font-size: 14px;
  }

  .acg-category__text {
    font-size: 12px;
    line-height: 1.45;
  }

  .acg-modal__footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 12px;
    margin-top: 16px;
    flex-direction: column;
    gap: 8px;
  }

  .acg-modal__footer .acg-btn {
    width: 100%;
  }
}