@font-face {
  font-family: "Assistant";

  src: url("./fonts/Assistant-Regular.ttf") format("truetype");

  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Assistant";

  src: url("./fonts/Assistant-Bold.ttf") format("truetype");

  font-weight: 700;
  font-style: normal;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;

  font-family:
    "Assistant",
    Tahoma,
    Geneva,
    Verdana,
    sans-serif;

  background: white;
  display: flex;
  flex-direction: column;
}

/* ===== LAYOUT ===== */

.main-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
}

.left-panel {
  width: 50%;
  border-right: 1px solid #d1d5db;
}

#divider {
  width: 4px;
  cursor: col-resize;
  background: #d1d5db;
  flex-shrink: 0;
}

#divider:hover {
  background: #94979b;
}

.right-panel {
  flex: 1;
  background: white;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.dragging iframe {
  pointer-events: none;
}

.dragging {
  user-select: none !important;
}

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);

  border: 0;
}

/* ===== TOPBAR ===== */

.topbar {
  background: #d0f3ff;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
  padding: 8px;
}

.logo-section,
.toolbar-section,
.actions-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  height: 80px;
}

.vertical-box {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-title {
  color: #000000;
  margin: 0;
  text-align: right;
  font-family: inherit;
}

.project-name-section {
  font-size: 20px;
}

.project-name-input {
  font-size: 20px;
  outline: none;
  border: 1px solid transparent;
  text-align: right;

  font-family: inherit;

  background: transparent;

  color: black;

  padding-right: 0;
  padding-left: 4px;
  padding-top: 4px;
  padding-bottom: 4px;

  border-radius: 0px;
}

.project-name-input:hover,
.project-name-input:focus {
  border-color: #ea5b25;
}

.utility-bar {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;

  gap: 16px;
  padding: 16px;
  padding-top: 21px;
}

.layout-group {
  display: flex;
  gap: 8px;
  border-radius: 0;
  padding: 8px;
  background: #ea5b25;
}

/* ===== BUTTONS ===== */

select {
  padding-top: 22px !important;
  padding-bottom: 22px !important;
}

.banner-btn {
  font-family: inherit;
  border: none;

  padding: 16px 16px;

  font-size: 16px;

  cursor: pointer;

  transition:
    transform 0.2s,
    background 0.2s;
}

.banner-btn:active {
  transform: scale(0.90);
}

.blue-btn {
  background: #3dbfeb;
  color: white;
}

.blue-btn:hover,
.blue-btn:focus {
  background: #339ec2;
  color: white;
}

.yellow-btn {
  background: #fdff83;
  color: black;
}

.yellow-btn:hover,
.yellow-btn:focus {
  background: #cfd16b;
  color: white;
}

.orange-btn {
  background: #ea5b25;
  color: white;
}

.orange-btn:hover,
.orange-btn:focus {
  background: #be491e;
  color: white;
}

/* ===== EDITOR ===== */

.editor-section {
  display: flex;
  flex-direction: column;
  height: 50%;
  position: relative;
}

.border-top {
  border-top: 1px solid #d1d5db;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 4px 16px;

  font-size: 12px;
  font-family: monospace;

  color: #6b7280;

  background: #f3f4f6;

  border-bottom: 1px solid #d1d5db;
}

.editor-wrapper {
  position: relative;
  flex: 1;

  overflow: hidden;

  background-color: #f8f9fa;
  border-bottom: 1px solid #cbd5e1;
}

.code-layer {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  margin: 0;
  padding: 16px;

  box-sizing: border-box;
  border: none;

  overflow: auto;

  white-space: pre-wrap;
  word-wrap: break-word;

  font-family:
    Consolas,
    Monaco,
    "Andale Mono",
    "Ubuntu Mono",
    monospace;

  font-size: 14px;
  line-height: 1.5;

  tab-size: 4;
}

/* Highlight layer */

.highlighting-layer {
  z-index: 1;

  background: transparent;
  color: #333;

  pointer-events: none;
}

.highlighting-layer code {
  font-family: inherit;
  font-size: inherit;
}

/* Input layer */

.editing-layer {
  z-index: 2;

  background: transparent;

  color: transparent;
  caret-color: black;

  resize: none;
  outline: none;
}

.editing-layer::selection {
  background: rgba(0, 0, 0, 0.1);
  color: transparent;
}

/* ===== SIMPLE BUILT-IN HIGHLIGHT COLORS ===== */

.tag {
  color: #e11d48;
  font-weight: bold;
}

.attr {
  color: #2563eb;
}

.string {
  color: #16a34a;
}

.selector {
  color: #7c3aed;
  font-weight: bold;
}

.property {
  color: #059669;
}

.number {
  color: #d97706;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1250px) {

  .actions-section {
    gap: 8px;
  }

  .banner-btn {
    padding: 12px;
  }

  .layout-group {
    padding-left: 8px;
    padding-right: 8px;
  }

  select {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
}

@media (max-width: 1070px) {

  .actions-section {
    gap: 4px;
  }

  .banner-btn {
    padding: 4px;
  }

  .layout-group {
    gap: 4px;
    padding: 4px;
  }

  select {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
  }



  .left-panel,
  .right-panel {
    width: 100%;
    height: 50%;
  }
}

@media (max-width: 820px) {
  .logo-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .topbar {
    justify-content: center;
    flex-direction: column;
  }

  .actions-section {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 450px) {
  .logo-title {
    font-size: 18px;
  }

  .project-name-section,
  .project-name-input {
    font-size: 12px;
  }

  .logo {
    height: 50px;
  }
}