/* Scroll Template Styles */

:root {
  --primary-color: #4a90e2;
  --secondary-color: #50c878;
  --background-color: #f5f5f5;
  --text-color: #333;
  --form-background: #ffffff;
}

.CodeMirror {
  border-radius: 8px;
  border: 1px solid rgba(204, 204, 204, 0.8);
}

body {
  font-family: "Arial", sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 10px;
}

.selectedFile {
  font-weight: bold;
}

#errorMessage {
  color: red;
  flex: 100%;
  padding: 30px 8px 0;
  display: none;
}

.templateButton {
  flex: 100%;
  padding: 20px 0 0 0px;
  font-size: 0.8em;
  color: rgba(204, 204, 204, 0.8);
}

#templateOptions a {
  color: rgba(204, 204, 204, 0.8);
}
#templateOptions a:hover {
  cursor: pointer;
  color: rgba(154, 154, 154, 1);
}
#templateOptions a.selected {
  color: rgba(154, 154, 154, 1);
}

.darkText,
.greyText {
  color: rgba(204, 204, 204, 0.8);
  text-align: center;
  font-size: 0.8rem;
  white-space: pre;
  font-family: monospace;
  margin: auto;
  padding: 0.5rem;
}
.historyLink,
.duplicateButton {
  color: rgba(204, 204, 204, 0.8);
}
.duplicateButton:hover {
  text-decoration: underline;
  cursor: pointer;
}

.darkText {
  color: rgba(104, 104, 104, 1);
}

.drag-over {
  border: 2px dashed #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

iframe {
  height: 600px;
  width: 400px;
  border: 0;
  transform: scale(0.5);
  transform-origin: 0 0;
}
.iframeHolder {
  width: 200px;
  height: 125px;
  box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin: 10px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}
#fileList {
  margin: 0 10px;
}
.nonScrollFile {
  color: grey;
}

.createButton {
  cursor: pointer;
}

form {
  background-color: var(--form-background);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: top;
  margin: 0 auto;
  max-width: 600px;
}
#createForm {
  padding-bottom: 20px;
}
#importForm {
  margin-top: 20px;
}
#editForm {
  max-width: 1025px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0;
}
.editorHolder {
  border-left: 1px solid rgb(232, 232, 232);
  padding: 7px;
}

input[type="text"],
textarea {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
}
textarea {
  width: 80ch; /* Set width to 60 characters */
  max-width: 100%; /* Ensure it doesn't overflow on small screens */
}
.CodeMirror {
  border: 0;
}

button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

button:hover {
  background-color: #45b069;
}

button:active {
  background-color: #35a059;
}

.publishButton {
  margin-top: 7px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  form {
    flex-direction: column;
    align-items: stretch;
  }

  input[type="text"] {
    border-radius: 4px;
    margin-bottom: 10px;
  }

  button {
    border-radius: 4px;
  }
}
