/* YooAI Product Group Manager — собственные классы, макеты через модификаторы */

.yooai-pgm {
  --yooai-pgm-card-bg: #f3f5f7;
  --yooai-pgm-icon-border: #9ec9ef;
  --yooai-pgm-icon-bg: #ffffff;
  --yooai-pgm-icon-color: #3498db;
  width: 100%;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yooai-pgm__block {
  width: 100%;
}

.yooai-pgm__card {
  background: var(--yooai-pgm-card-bg);
  border-radius: 16px;
  padding: 22px 24px 20px;
}

.yooai-pgm__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 18px;
  color: #1a1a1a;
}

/* —— benefits —— */
.yooai-pgm__benefits {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yooai-pgm__benefit {
  display: flex;
  align-items: center;
  gap: 14px;
}

.yooai-pgm__benefit-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--yooai-pgm-icon-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yooai-pgm-icon-bg);
  color: var(--yooai-pgm-icon-color);
}

.yooai-pgm__benefit-icon img {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
}

.yooai-pgm__benefit-icon--svg {
  -webkit-mask: none;
  mask: none;
}

.yooai-pgm__benefit-icon--svg::before {
  content: '';
  display: block;
  width: 90%;
  height: 90%;
  background-color: var(--yooai-pgm-icon-color);
  -webkit-mask: var(--ypgm-icon) center / contain no-repeat;
  mask: var(--ypgm-icon) center / contain no-repeat;
}

.yooai-pgm__benefit-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.4;
  color: #222;
}

.yooai-pgm__help {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border: 0;
  border-radius: 50%;
  background: #c5c9cf url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ctext x='50%25' y='54%25' text-anchor='middle' dominant-baseline='middle' font-size='11' font-family='Arial' fill='%23fff'%3E%3F%3C/text%3E%3C/svg%3E") center / 16px no-repeat;
  vertical-align: middle;
  cursor: pointer;
  padding: 0;
}

/* —— fields —— */
.yooai-pgm__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.yooai-pgm__field-label {
  font-weight: 700;
  margin-bottom: 4px;
  color: #111;
}

.yooai-pgm__field-text {
  font-size: 14px;
  line-height: 1.45;
  color: #333;
}

.yooai-pgm__link {
  color: #2f80ed;
  text-decoration: underline;
  font-size: 15px;
}

.yooai-pgm__link--plain {
  text-decoration: none;
  cursor: default;
}

/* —— layout variants —— */
.yooai-pgm__block--benefits .yooai-pgm__card {
  background: var(--yooai-pgm-card-bg);
}

.yooai-pgm__block--benefits .yooai-pgm__benefits {
  margin-bottom: 0;
}

.yooai-pgm__block--fields .yooai-pgm__card {
  background: var(--yooai-pgm-card-bg);
}

.yooai-pgm__block--fields .yooai-pgm__fields {
  margin-bottom: 12px;
}

.yooai-pgm__block--additional_info .yooai-pgm__benefits {
  margin-bottom: 18px;
}

/* —— modal —— */
.yooai-pgm__modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.yooai-pgm__modal[hidden] {
  display: none !important;
}

.yooai-pgm__modal-dialog {
  position: relative;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.yooai-pgm__modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}

.yooai-pgm__modal-body {
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

@media (max-width: 767px) {
  .yooai-pgm__card {
    padding: 18px 16px 16px;
    border-radius: 12px;
  }

  .yooai-pgm__title {
    font-size: 18px;
  }

  .yooai-pgm__benefit-icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .yooai-pgm__benefit-icon--svg::before {
    width: 28px;
    height: 28px;
  }
}
