.yadreg-wrap {
  max-width: 760px;
  margin: 24px auto;
  padding: 16px;
}

.yadreg-card {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(14, 20, 38, 0.08);
  padding: 22px;
}

.yadreg-title {
  margin: 0 0 10px;
  font-size: 1.7rem;
  line-height: 1.2;
  color: #15213a;
}

.yadreg-intro {
  margin: 0 0 18px;
  color: #51607a;
}

.yadreg-messages {
  margin-bottom: 16px;
}

.yadreg-notice {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-weight: 600;
}

.yadreg-notice-success {
  background: #ecfdf3;
  color: #0f6b39;
  border: 1px solid #b7ebc8;
}

.yadreg-notice-error {
  background: #fff1f1;
  color: #9c1c1c;
  border: 1px solid #f5c2c2;
}

.yadreg-grid {
  display: grid;
  gap: 18px;
}

.yadreg-field label,
.yadreg-lookup-block label {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: #132038;
  margin-bottom: 7px;
}

.yadreg-field input,
.yadreg-lookup-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd7e6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}

.yadreg-help {
  margin: 8px 0 0;
  color: #60708d;
  font-size: 0.92rem;
}

.yadreg-lookup-block {
  padding: 14px;
  border: 1px dashed #ccd5e4;
  border-radius: 14px;
  background: #fafcff;
}

.yadreg-lookup-row {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.yadreg-secondary-btn,
.yadreg-submit-btn,
.yadreg-media-card,
.yadreg-media-remove,
.yadreg-media-change {
  appearance: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.yadreg-secondary-btn {
  background: #e8eefc;
  color: #15326e;
  min-height: 48px;
  padding: 12px 16px;
}

.yadreg-submit-btn {
  width: 100%;
  margin-top: 18px;
  min-height: 54px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e55d6, #173f9f);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 10px 24px rgba(30, 85, 214, 0.25);
}

.yadreg-submit-btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.yadreg-loading-text {
  display: none;
}

.yadreg-submit-btn.is-loading .yadreg-submit-text {
  display: none;
}

.yadreg-submit-btn.is-loading .yadreg-loading-text {
  display: inline;
}

.yadreg-hidden-input,
.yadreg-hp,
.yadreg-is-hidden {
  display: none !important;
}

.yadreg-media-uploader {
  display: grid;
  gap: 12px;
}

.yadreg-media-card {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: center;
  padding: 22px 18px;
  border: 2px dashed #9eb7ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
  color: #15326e;
}

.yadreg-media-icon {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(21, 50, 110, 0.12);
  font-size: 2rem;
  line-height: 1;
}

.yadreg-media-title {
  display: block;
  font-size: 1.06rem;
  color: #132038;
}

.yadreg-media-subtitle {
  display: block;
  font-size: 0.95rem;
  color: #60708d;
  font-weight: 500;
}

.yadreg-media-preview {
  display: grid;
  gap: 10px;
}

.yadreg-media-empty {
  color: #6a768f;
  font-size: 0.94rem;
}

.yadreg-media-file {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7dfed;
  border-radius: 14px;
  background: #fbfcff;
}

.yadreg-media-file-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.yadreg-media-file-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2744;
  word-break: break-word;
}

.yadreg-media-file-type {
  font-size: 0.82rem;
  color: #60708d;
}

.yadreg-media-file img,
.yadreg-media-file video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.yadreg-media-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.yadreg-media-remove,
.yadreg-media-change {
  min-height: 42px;
  padding: 10px 14px;
}

.yadreg-media-remove {
  background: #fff1f1;
  color: #9c1c1c;
}

.yadreg-media-change {
  background: #eef4ff;
  color: #15326e;
}

.yadreg-limits {
  margin-top: 12px;
  color: #6a768f;
}

@media (min-width: 700px) {
  .yadreg-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .yadreg-lookup-row {
    flex-direction: row;
  }

  .yadreg-lookup-row input {
    flex: 1;
  }
}
