body {
  font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
  font-size: 13px;
}

.grid {
  display: grid;
  gap: .75rem;
  max-width: 28rem
}

.field {
  display: flex;
  flex-direction: column;
  font-size: .97rem;
  margin-bottom: 0.7rem
}

.field input,
.field textarea,
.inlineField {
  padding: .5rem .8rem;
  border: 1.2px solid #bfc9d1;
  border-radius: .5rem;
  font-size: 1rem;
  margin-top: 0.2rem;
  background: #f8fafd;
  transition: border 0.18s, box-shadow 0.18s
}

.field input:focus,
.field textarea:focus,
.inlineField:focus {
  border: 1.2px solid #4f8cff;
  box-shadow: 0 0 0 2px #4f8cff22;
  outline: none
}

.preview {
  border: 1px solid #ccc;
  padding: 1rem;
  max-width: 600px
}

.card {
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: .5rem
}

.card h1 {
  margin: .2em 0
}

.date {
  font-size: .8rem;
  color: #777
}

.iframe-container {
  max-width: 99%;
  margin: 0 auto;
  background: none;
  /* background: #f6f6f6; */
  /* box-shadow: 0 2px 16px rgba(0,0,0,0.07); */
  padding: 0.5rem 0.2rem 0.2rem 0.2rem;
  box-sizing: border-box;
}

h2,
h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
}

#interactive {
  margin-bottom: 1.2rem;
}

.bbcode-area {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
}

#bbcode {
  width: 100%;
  max-width: 600px;
  min-width: 300px;
  border-radius: 0.7rem;
  border: 1.5px solid #d0d0d0;
  color: #2E8B57;
  padding: 0.8rem 1rem;
  background: #f8f8fa;
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #9b9b9b 0%, #a7a7a7 100%);
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.5rem 0.6rem;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.08);
  transition: background 0.2s, transform 0.13s;
  position: relative;
  overflow: hidden;
}

.copy-btn:hover,
.copy-btn:focus {
  transform: translateY(-2px) scale(1.03);
}

.copy-done {
  animation: fadeInOut 1.2s;
  color: #b2ffb2;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

::-webkit-scrollbar {
  width: 8px;
  background: #e6eaf0;
}

::-webkit-scrollbar-thumb {
  background: #c2d1e6;
  border-radius: 4px;
}

.inlineField[type="text"],
.inlineField[type="date"],
.inlineField[type="file"],
.inlineField,
textarea.inlineField {
  border: 1.2px solid #bfc9d1;
  border-radius: 0.5rem;
  background: #f8fafd;
  font-size: 1.1em;
  padding: 0.5em 0.9em;
  margin: 0.2em 0;
  transition: border 0.18s, box-shadow 0.18s;
  box-shadow: none;
  outline: none;
}

textarea.inlineField {
  min-width: 50%;
  max-width: 725px;
}

.inlineField[type="text"]:focus,
.inlineField[type="date"]:focus,
textarea.inlineField:focus {
  border: 1.2px solid #4f8cff;
  box-shadow: 0 0 0 2px #4f8cff22;
  background: #fff;
}


.multiselect-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.2em 0;
    padding: 0.5em;
    border: 1.2px solid #bfc9d1;
    border-radius: 0.5rem;
    background: #f8fafd;
    max-height: 200px;
    overflow-y: auto; }

    .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1em;
    padding: 0.2em 0;
    transition: background-color 0.2s;
    border-radius: 0.3rem;
    padding: 0.3em 0.5em; }

    .checkbox-label:hover {
  background-color: #e8f2ff;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #4f8cff;
}

.checkbox-label span {
  flex: 1;
  line-height: 1.4;
}

.checkbox-label:not(.multiselect-container .checkbox-label) {
  border: 1.2px solid #bfc9d1;
  display: flex;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background: #f8fafd;
  padding: 0.5em 0.9em;
  margin: 0.2em 0;
  transition: border 0.18s, box-shadow 0.18s;
}

.checkbox-label:not(.multiselect-container .checkbox-label):hover {
  border: 1.2px solid #4f8cff;
  box-shadow: 0 0 0 2px #4f8cff22;
  background: #fff;
}

.radio-group,
.multiselect-group,
.checkbox-group {
  margin: 0.5em 0;
  padding: 0.5em;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  background: #fafafa;
}

.radio-group input[type="radio"],
.multiselect-group input[type="checkbox"],
.checkbox-group input[type="checkbox"] {
  margin-right: 0.5em;
  cursor: pointer;
}

.radio-group label,
.multiselect-group label,
.checkbox-group label {
  cursor: pointer;
  font-size: 1em;
  line-height: 1.4;
  display: inline-block;
  margin-bottom: 0.3em;
}

select.inlineField {
  border: 1.2px solid #bfc9d1;
  border-radius: 0.5rem;
  background: #f8fafd;
  font-size: 1.1em;
  padding: 0.5em 0.9em;
  margin: 0.2em 0;
  transition: border 0.18s, box-shadow 0.18s;
  box-shadow: none;
  outline: none;
  cursor: pointer;
}

select.inlineField:focus {
  border: 1.2px solid #4f8cff;
  box-shadow: 0 0 0 2px #4f8cff22;
  background: #fff;
}

select.inlineField option {
  padding: 0.5em;
  background: #fff;
}

.background-form textarea.inlineField {
  min-width: 745px;
  max-width: 745px;
}

.background-form .inlineField[type="text"] {
  width: 330px;
}

.checkbox-label input[type="radio"] {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #4f8cff;
}

.radio-group.inlineField {
  border: none;
  background: none;
  padding: 0;
  margin: 0.2em 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.application-date input {
  width: 20px;
}

/* ГЕНЕРАТОР ЗАКРЫВАЕТСЯ */

.warning-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.warning-overlay.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.warning-overlay.hide {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-20px);
}

.warning-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px 24px;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.warning-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

@keyframes slideDown {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .warning-overlay {
    top: 16px;
    left: 16px;
    right: 16px;
    transform: none;
  }
  
  .warning-overlay.show {
    transform: translateY(0);
  }
  
  .warning-overlay.hide {
    transform: translateY(-20px);
  }
  
  .warning-content {
    max-width: none;
    padding: 14px 18px;
  }
  
  .warning-text {
    font-size: 13px;
  }
}