

/* Окно копирования продукта */

.gcp-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10050; /* выше шапки и модалок GetCourse */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.gcp-modal {
  width: 600px;
  max-width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  /* фолбэк для браузеров без backdrop-filter — почти непрозрачный фон */
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1d1d1f;
  animation: gcp-in 0.18s ease-out;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .gcp-modal {
    background: rgba(252, 252, 253, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.65);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
  }
}

@keyframes gcp-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.gcp-head {
  flex: 0 0 auto;
  padding: 22px 26px 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gcp-body {
  /* тело окна и есть скролл-контейнер: при десятке предложений растёт не окно, а список.
     min-height нужен, иначе flex-элемент не даёт содержимому сжаться */
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 26px 8px;
  overflow-y: auto;
}

.gcp-label {
  display: block;
  margin-bottom: 8px;
  color: #6e6e73;
  font-size: 13px;
}

.gcp-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gcp-input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

.gcp-input::placeholder {
  color: #a1a1a6;
}

/* переключатель в стиле iOS: выглядит уместнее галочки в стеклянном окне */
.gcp-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}

.gcp-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gcp-switch-track {
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.24);
  transition: background 0.2s;
  position: relative;
}

.gcp-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}

.gcp-switch input:checked + .gcp-switch-track {
  background: #34c759;
}

.gcp-switch input:checked + .gcp-switch-track::after {
  transform: translateX(18px);
}

.gcp-switch input:disabled + .gcp-switch-track {
  opacity: 0.5;
}

/* редактор тегов: чипы + свободный ввод */
.gcp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-sizing: border-box;
  cursor: text;
}

.gcp-tags.is-focused {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

.gcp-tags.is-loading {
  color: #a1a1a6;
}

.gcp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 4px 0 11px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: #0057b8;
  font-size: 13px;
  white-space: nowrap;
}

.gcp-chip button {
  border: 0;
  background: none;
  padding: 0 4px;
  color: inherit;
  opacity: 0.5;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.gcp-chip button:hover {
  opacity: 1;
}

.gcp-tags-input {
  flex: 1 1 90px;
  min-width: 90px;
  height: 28px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  outline: none;
}

/* предложения */
.gcp-offers {
  margin-top: 22px;
}

.gcp-offers-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gcp-offers-title {
  color: #6e6e73;
  font-size: 13px;
}

.gcp-offers-all {
  font-size: 13px;
  color: #0071e3;
  cursor: pointer;
}

.gcp-offers-all:hover {
  text-decoration: underline;
}

.gcp-offer {
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(120, 120, 128, 0.07);
}

.gcp-offer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.gcp-offer-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #0071e3;
}

.gcp-offer-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcp-offer-edit {
  flex: 0 0 auto;
  color: #0071e3;
  font-size: 13px;
  cursor: pointer;
}

.gcp-offer-edit:hover {
  text-decoration: underline;
}

.gcp-offer-fields {
  margin-top: 12px;
}

.gcp-offer-fields .gcp-label {
  margin-top: 4px;
}

.gcp-note {
  margin-top: 20px;
  color: #86868b;
  font-size: 13px;
  line-height: 1.5;
}

/* лог выполнения */
.gcp-log {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gcp-log:empty {
  display: none;
}

.gcp-line {
  position: relative;
  padding: 4px 0 4px 24px;
  line-height: 1.45;
}

.gcp-line::before {
  position: absolute;
  left: 2px;
  top: 4px;
  font-size: 13px;
}

.gcp-line-run {
  color: #86868b;
}

.gcp-line-run::before {
  content: '○';
}

.gcp-line-ok {
  color: #1d7a35;
}

.gcp-line-ok::before {
  content: '✓';
}

.gcp-line-fail {
  color: #c0392b;
}

.gcp-line-fail::before {
  content: '✕';
}

.gcp-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px 22px;
}

.gcp-btn {
  height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.gcp-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.gcp-btn-plain {
  background: rgba(120, 120, 128, 0.14);
  color: #1d1d1f;
}

.gcp-btn-plain:not(:disabled):hover {
  background: rgba(120, 120, 128, 0.22);
}

.gcp-btn-main {
  background: #0071e3;
  color: #fff;
}

.gcp-btn-main:not(:disabled):hover {
  background: #0062c4;
}

