/* Media */
@media screen and (max-width: 600px) {
  #content {
    flex-direction: column;
  }

  #first-column {
    flex: 1;
    min-width: unset !important;
  }
}

/* Prestyled elements*/
* {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, ul, ol, p {
  margin-top: 0;
  margin-bottom: 0;
}

ul, ol {
  padding-left: 1.2rem;
}

input {
  font-family: inherit;
  font-size: inherit;
  background: var(--input-bg);
  color: var(--foreground);
  border: 1px solid var(--input-border);
  padding: 0.5em;
}

button {
  font-family: inherit;
  font-size: inherit;
  background: var(--button-bg);
  color: var(--button-fg);
  border: 1px solid var(--input-border);
  padding: 0.5em 1em;
  cursor: pointer;
}

button.ghost {
  font-family: inherit;
  font-size: inherit;
  color: var(--button-fg);
  border: none;
  background: none;
  border-radius: 1rem;
  padding: 0.5em 1em;
  cursor: pointer;

  &:hover {
    background: var(--button-bg);
  }
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

dialog {
  color: var(--foreground);
  padding: 1rem;
  background: var(--background);
}

::-webkit-scrollbar {
  width: 1rem;
}

::-webkit-scrollbar-track {
  background: var(--input-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--input-border);
}


/* Block elements */
#content {
  gap: 1rem;
  height: 100%;
  display: flex;
  padding: 0.5rem;
  align-items: flex-start;
}

.card {
  gap: 1rem;
  padding: 0.5rem;
  max-height: 100%;
  overflow: hidden;
  border-radius: 0.25rem;
}

#first-column {
  min-width: 30rem;
}

#google-search-query-input {
  flex: 1;
  color: var(--foreground);
  resize: vertical;
  padding: 0.5em;
  background: var(--input-bg);
}

.history {
  overflow: auto;
}

.history-line-content {
  flex: 1;
  cursor: pointer;
  display: flex;
  padding: 0 0 0 1rem;
  max-width: 600px;
  word-wrap: break-word;
  align-items: center;
  user-select: none;
  justify-content: space-between;

  &:hover {
    background: var(--button-bg);
  }

  .delete-btn {
    color: var(--foreground);
    opacity: 0.2;
    transition: opacity 0.3s;

    &:hover {
      color: var(--alert);
      opacity: 1;
      transition: opacity 0.3s;
    }
  }
}

#bookmarks-list {
  gap: 0.5rem;
  display: flex;
  flex-wrap: wrap;
}

.bookmark-cell {
  gap: 1rem;
  color: var(--foreground);
  padding: 0.5rem 1rem;
  display: flex;
  max-width: 300px;
  background: var(--input-bg);
  align-items: center;
  border-radius: 0.25rem;
  justify-content: space-between;
  text-decoration: none;

  &:hover {
    background: var(--button-bg);
  }

  .bookmark-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}


.bookmark-delete-btn {
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0;

  &:hover {
    color: var(--alert);
  }
}

.help-section {
  right: 1rem;
  bottom: 1rem;
  cursor: pointer;
  position: fixed;
}


/* Utilities */
.p-05 {
  padding: 0.5rem;
}

.pb-05 {
  padding-bottom: 0.5rem;
}

.pb-1 {
  padding-bottom: 1rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.gap-05 {
  gap: 0.5rem;
}

.gap-1 {
  gap: 1rem;
}

.pointer {
  cursor: pointer;
}

.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-space {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wrap {
  flex-wrap: wrap;
}

.hide-overflow {
  overflow: hidden;
}

.h-100 {
  height: 100%;
}

.pre {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment {
  color: var(--comment);
  font-size: 0.9rem;
  line-height: 1.4;
  font-family: monospace;
}

.br-025 {
  border-radius: 0.25rem;
}

.bg-2 {
  background: var(--background-2);
}

.bg-3 {
  background: var(--background-3);
}
