@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&family=Roboto:wght@500&family=Fira+Code:wght@500&display=swap");

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.container-fluid {
  height: calc(100% - 56px); /* Subtract navbar height */
  padding: 15px;
  overflow: hidden;
}

.row {
  height: 100%;
}

.editor,
.preview {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.editor {
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
}

.preview {
  background-color: #ffffff;
}

.CodeMirror {
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.5;
  font-family: "Fira Code", "Courier New", monospace;
}

.preview-content {
  flex-grow: 1;
  overflow-y: auto;
  font-family: "Roboto", Arial, sans-serif;
  padding: 10px;
}

.navbar {
  background-color: #343a40;
}

.navbar-brand {
  font-weight: 600;
  color: #ffffff !important;
  font-family: "Montserrat", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.5rem;
}

.toolbar {
  margin-bottom: 10px;
}

.toolbar button {
  margin-right: 5px;
}

#copy-btn {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

/* Dark theme styles */
.dark-theme {
  background-color: #2d2d2d;
  color: #ecf0f1;
}

.dark-theme .editor {
  background-color: #1e1e1e;
  border-right: 1px solid #404040;
}

.dark-theme .preview {
  background-color: #2d2d2d;
}

.dark-theme .preview-content {
  background-color: #2d2d2d;
  color: #ecf0f1;
  border-color: #404040;
}

.dark-theme .toolbar button {
  background-color: #404040;
  border-color: #505050;
  color: #ecf0f1;
}

.dark-theme .toolbar button:hover {
  background-color: #505050;
  border-color: #606060;
  color: #ffffff;
}

.dark-theme .btn-outline-secondary {
  color: #ecf0f1;
  border-color: #404040;
}

.dark-theme .btn-outline-secondary:hover {
  background-color: #404040;
  color: #ffffff;
}

@media (max-width: 767.98px) {
  body,
  html {
    overflow: auto;
  }

  .container-fluid {
    height: auto;
    overflow: visible;
  }

  .row {
    flex-direction: column;
  }

  .editor,
  .preview {
    height: auto;
    min-height: 50vh;
  }

  .editor {
    border-right: none;
    border-bottom: 1px solid #dee2e6;
  }
}

body {
  height: 100vh;
  overflow: hidden;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.toolbar button {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

.editor,
.preview {
  height: calc(100vh - 80px);
  padding: 20px;
}

.preview-content {
  height: calc(100% - 40px);
  overflow-y: auto;
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.CodeMirror {
  height: calc(100% - 90px) !important;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* Dark theme support */
.preview-content {
  background-color: #fff;
}

body.dark-theme .preview-content {
  background-color: #2d2d2d;
  color: #fff;
}
