/* ─── Base Reset (from index.css) ─────────────────────────────────────────── */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: black;
  color: white;
  height: 100vh;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

#root {
  height: 100%;
}

/* ─── Layout & Component Styles (from App.css) ─────────────────────────────── */

.header-label {
  text-align: center;
  color: darkgray;
}

.header-comment {
  font-size: 0.8rem;
  padding-left: 15px;
}

.header-cross-btn {
  display: none;
}

.header-btn {
  margin: 10px;
  font-size: 1.3rem;
}

.writer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.text-area {
  height: 100%;
  margin: 1rem;
  border: none;
  padding: 1rem;
  resize: none;
  outline: none;
}

textarea.text-area:hover {
  outline: none;
}

.lang-form {
  text-align: center;
  color: orange;
}

.github-link {
  display: flex;
  align-items: center;
  margin: 5px;
}

.github-link a {
  color: wheat;
  margin-left: 5px;
  margin-right: 5px;
}

.header-links {
  display: flex;
  justify-content: center;
}

.info-keybinding {
  text-align: center;
  color: crimson;
}


@media screen and (max-width: 768px) {
  .info-keybinding {
    display: none;
  }

  .header-cross-btn {
    display: inline;
    padding: 12px;
  }
}

/* ─── Action Bar (Copy / Clear) ─────────────────────────────────────────────── */

.action-bar {
  display: flex;
  gap: 8px;
  padding: 4px 1rem;
}

.action-bar button {
  padding: 4px 14px;
  background: #333;
  color: white;
  border: 1px solid #666;
  border-radius: 3px;
}

.action-bar button:hover {
  background: #444;
}

/* ─── Caret-Position Suggestion Popover ─────────────────────────────────────── */

.caret-popover {
  position: fixed;
  margin: 0;
  padding: 0;
  border: 1px solid #555;
  background: #1e1e1e;
  color: white;
  min-width: 120px;
  max-width: 220px;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.caret-suggest {
  display: block;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid #333;
  font-size: 0.95rem;
}

.caret-suggest:last-child {
  border-bottom: none;
}

.caret-suggest:hover {
  background: #2e2e2e;
}

.caret-suggest.selected {
  background: white;
  color: black;
  font-weight: 500;
  border-bottom: 1px solid #ccc;
}

/* ─── Layout Dialog ─────────────────────────────────────────────────────────── */

#layout-dialog::backdrop {
  background-color: black;
}

/* ─── Keys.css — Keyboard Key Rendering (from keys.css, MIT License) ───────── */
/* Author: Michael Hüneburg — http://michaelhue.com/keyscss                     */

kbd, .key {
  display: inline;
  display: inline-block;
  min-width: 1em;
  padding: .2em .3em;
  font: normal .85em/1 "Lucida Grande", Lucida, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  -moz-border-radius: .3em;
  -webkit-border-radius: .3em;
  border-radius: .3em;
  border: none;
  cursor: default;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

kbd[title], .key[title] {
  cursor: help;
}

kbd.dark, .dark-keys kbd, .key, .key.dark, .dark-keys .key {
  background: rgb(80, 80, 80);
  background: -moz-linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80));
  background: -webkit-gradient(linear, left top, left bottom, from(rgb(60, 60, 60)), to(rgb(80, 80, 80)));
  color: rgb(250, 250, 250);
  text-shadow: -1px -1px 0 rgb(70, 70, 70);
  -moz-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3);
  -webkit-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3);
}

kbd, kbd.light, .light-keys kbd, .key.light, .light-keys .key {
  background: rgb(250, 250, 250);
  background: -moz-linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255));
  background: -webkit-gradient(linear, left top, left bottom, from(rgb(210, 210, 210)), to(rgb(255, 255, 255)));
  color: rgb(50, 50, 50);
  text-shadow: 0 0 2px rgb(255, 255, 255);
  -moz-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9);
  -webkit-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9);
  box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9);
}
