.rh-ai-overlay {
  position: fixed; inset: 0; background: rgba(10,10,15,0.75);
  display: none; align-items: center; justify-content: center; z-index: 9999; padding: 16px;
}
.rh-ai-overlay.open { display: flex; }

.rh-ai-modal {
  background: #fff; border-radius: 18px; max-width: 500px; width: 100%;
  padding: 28px 24px 24px; font-family: inherit;
  max-height: 92vh; overflow-y: auto; position: relative;
}
.rh-modal-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; padding-right: 28px; }

.rh-ai-close {
  position: absolute; top: 14px; right: 16px; font-size: 24px; line-height: 1;
  background: none; border: none; cursor: pointer; color: #888; padding: 0;
}
.rh-ai-close:hover { color: #111; }

/* ---- поля ---- */
.rh-ai-field { margin-bottom: 14px; }
.rh-ai-field label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 5px; }
.rh-label-hint { font-weight: 400; color: #999; font-size: 12px; }
.rh-ai-field input[type=text],
.rh-ai-field input[type=tel],
.rh-ai-field textarea,
.rh-ai-field select {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 9px;
  font-size: 14px; font-family: inherit; box-sizing: border-box;
  transition: border-color .15s;
}
.rh-ai-field input:focus,
.rh-ai-field textarea:focus { outline: none; border-color: #c0392b; }
.rh-ai-field textarea { resize: vertical; min-height: 72px; }

/* ---- счётчик символов ---- */
.rh-char-count { text-align: right; font-size: 11px; color: #bbb; margin-top: 3px; }

/* ---- переключатель логотипа ---- */
.rh-logo-toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.rh-logo-opt {
  flex: 1; padding: 9px; border: 1.5px solid #e0e0e0; border-radius: 9px;
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: #555;
  transition: all .15s;
}
.rh-logo-opt.active { border-color: #c0392b; background: #fdf3f2; color: #c0392b; }

/* ---- загрузка файла ---- */
.rh-file-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1.5px dashed #d0d0d0; border-radius: 9px;
  font-size: 13px; color: #666; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rh-file-label:hover { border-color: #c0392b; background: #fdf3f2; color: #c0392b; }

.rh-logo-preview-img {
  max-height: 64px; max-width: 160px; border-radius: 8px; margin-top: 8px;
  border: 1px solid #eee; object-fit: contain;
}

/* ---- спонсорские лого ---- */
.rh-sponsors-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rh-sponsor-thumb {
  position: relative; width: 64px; height: 64px; border-radius: 8px;
  border: 1px solid #e0e0e0; overflow: hidden; background: #f8f8f8;
}
.rh-sponsor-thumb img { width: 100%; height: 100%; object-fit: contain; }
.rh-sponsor-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
  border: none; font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.rh-sponsor-add { font-size: 12px; }

/* ---- кнопка генерации ---- */
.rh-ai-btn {
  width: 100%; padding: 13px; border: none; border-radius: 9px;
  background: #111; color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 10px; transition: background .15s;
}
.rh-ai-btn:hover:not(:disabled) { background: #333; }
.rh-ai-btn:disabled { background: #bbb; cursor: not-allowed; }

/* ---- счётчик генераций ---- */
.rh-ai-counter { font-size: 13px; color: #888; text-align: center; margin-top: 10px; }

/* ---- ошибки ---- */
.rh-ai-error { color: #c0392b; font-size: 13px; margin-top: 8px; }

/* ---- подсказки ---- */
.rh-ai-hint { font-size: 13px; color: #888; margin-top: 6px; line-height: 1.5; }

/* ---- превью результата ---- */
.rh-ai-preview { margin-top: 18px; text-align: center; }
.rh-ai-preview canvas { max-width: 100%; border-radius: 12px; display: block; margin: 0 auto 10px; }
.rh-no-copy {
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}

/* ---- экран лимита ---- */
.rh-limit-screen { text-align: center; padding: 24px 0; }
.rh-limit-icon { font-size: 52px; margin-bottom: 12px; }
.rh-limit-screen h3 { margin: 0 0 10px; font-size: 20px; }

/* ---- кнопка-триггер на сайте ---- */
.rh-ai-trigger {
  display: inline-block; padding: 14px 32px; background: #c0392b; color: #fff;
  border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer;
  border: none; text-decoration: none; transition: background .2s;
}
.rh-ai-trigger:hover { background: #a93226; }
