/* General body styles */
* {
    scrollbar-color: rgba(255, 255, 255, 0.2)  rgba(0, 0, 0, 0);
}
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  transition: background 0.5s, color 0.5s;
  user-select: none;
}

button {
    padding: 0;
    background: none;
    border: none;
}

body.light-theme {
  background: #f9f9fb;
  color: #222;
}

body.dark-theme {
  background: var(--luna-theme-background-color-primary);
  color: #f0f0f0;
}

/* Smooth theme transition */
body.theme-transition {
  transition: background 0.5s ease, color 0.5s ease;
}

:root {
    --luna-theme-color-primary: rgb(255, 255, 255);
    --luna-theme-background-color-primary: rgb(25, 25, 25);
}

/* App layout */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg, #eaeaea);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: background 0.5s ease;
  overflow-y: auto;
  transition: width 0.3s ease, padding 0.3s ease, background 0.5s ease;
}

body.dark-theme .sidebar {
  background: rgb(32, 32, 32);
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--sidebar-bg, #eaeaea);
  padding-bottom: 12px;
  transition: background 0.5s;
}

body.dark-theme .sidebar-header {
  background: rgb(32, 32, 32);
}

/* Collapsed Sidebar */
.sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

.app.sidebar-collapsed .note-area {
  flex: 1 1 100%;
  width: 100%;
  transition: width 0.3s ease;
}

/* Optional: Hide elements inside sidebar when collapsed */
.sidebar.collapsed * {
  display: none;
}

/* Style the toggle button */
.sidebar-toggle {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.sidebar-toggle.rotate {
  transform: rotate(180deg);
}

.logo {
  font-size: 1.5rem;
  margin: 0;
  font-weight: bold;
}

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg);
}

/* Search input */
.search-input {
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    width: -webkit-fill-available;
}

body.dark-theme .search-input {
  background: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
}

/* Menu button */
.menu-btn {
  background: #dcdcdc;
  border: none;
  padding: 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
    width: -webkit-fill-available;
    margin-top: 12px;
}

body.dark-theme .menu-btn {
  background: #333;
  color: #f0f0f0;
}

/* Note list */
.note-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Note preview items */
.note-preview {
  background: #fff;
  padding: 0.2em 0.6rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  cursor: grab;
  transition: transform 0.2s ease, background 0.5s;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.note-preview:hover {
  transform: scale(1.02);
  background: #f0f0f0;
}

.note-preview.active-note {
    background-color: #e3f2fd; /* Light blue, customize as needed */
    border-left: 4px solid #6525d6; /* Optional visual cue */
}

body.dark-theme .note-preview {
  background: #2a2a2a;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
}

body.dark-theme .note-preview:hover {
  background: #353535;
}

.note-icon {
  margin-right: 6px;
}

.note-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 500;
    color: rgb(155, 155, 155);
}

.note-tags {
  font-size: 0.75rem;
  color: #888;
}

body.dark-theme .note-tags {
  color: #bbb;
}

/* Note area (main content) */
.note-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  /*padding: 1rem 2rem;*/
  overflow-y: auto;
}

/* Note header */
.note-header {
    display: flex;
    position: sticky;
    top: 0;
    background: #f9f9fb;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 2rem;
    z-index: 1;
    transition: background 0.5s ease;
}

body.dark-theme .note-header {
    background: var(--luna-theme-background-color-primary);
}

/* Note title input */
.note-title-input {
  font-size: 1.8rem;
  font-weight: 700;
  border: none;
  background: transparent;
  outline: none;
  width: -webkit-fill-available;
  color: inherit;
  padding: 0 1rem;
}

.note-title-input::placeholder{
    font-weight: 800;
}

/* Toolbar buttons */
/*
.toolbar {
  display: flex;
  align-items: center;
}

.toolbar button {
  margin: 0 5px;
  font-size: 1rem;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  color: inherit;
  transition: background 0.3s, border-color 0.3s;
}

.toolbar {
  position: absolute;
  transform: translateY(-100%);
  background: var(--toolbar-bg, #fff);
  border: 1px solid #ccc;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: opacity 0.2s ease;
}

.toolbar button {
    width: 35px;
    aspect-ratio: 1/1;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  margin: 0 4px;
  transition: background 0.3s, border-color 0.3s;
}

.toolbar button:hover {
  background: #efefef;
}

.toolbar {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toolbar.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.dark-theme .toolbar button {
  border-color: #666;
}

body.dark-theme .toolbar button:hover {
  background: #444;
}
*/

#toolbar {
    display: flex; /* Align buttons horizontally */
    justify-content: space-evenly; /* Distribute space evenly between buttons */
    padding: 5px 10px;
  }

  #toolbar button {
    background: none;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.5s, border-color 0.3s;
    display: flex;
    justify-content: center;
  }

  #toolbar button:hover {
    background-color: #ddd;
    border-color: #aaa;
  }

  /* Optional: Style for active button */
  #toolbar button.ql-active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
  }

.note-updated {
    opacity: 1;
    transition: opacity 150ms linear;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(70, 68, 64, 0.45);
    height: 28px;
    white-space: nowrap;
    line-height: 1.2;
}

body.dark-theme .note-updated {
    color: rgba(255, 255, 255, 0.282);
}

.note-updated-mobile {
    position: sticky;
    bottom: 0;
    opacity: 1;
    transition: opacity 150ms linear;
    display: flex;
    align-items: center;
    font-size: 14px;
    background: #f9f9fb;
    color: rgba(70, 68, 64, 0.45);
    height: 28px;
    white-space: nowrap;
    line-height: 1.2;
    justify-content: center;
}

body.dark-theme .note-updated-mobile {
    background: var(--luna-theme-background-color-primary);
    color: rgba(255, 255, 255, 0.282);
}

/* Meta info */
.note-meta {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  color: gray;
  white-space: nowrap;
}

body.dark-theme .note-meta {
  color: #aaa;
}

/* Markdown Preview Area */
.quill-editor {
    display: flex;
    flex-direction: column;
  margin-top: 1rem;
  /*background: #f0f0f0;*/
  border-radius: 10px;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.5;
  min-height: 60vh;
  overflow: visible;
  outline: none;
  white-space: pre-wrap;
}

body.dark-theme .quill-editor {
  /*background: #1b1b1b;*/
  color: #eee;
}

.ql-bubble .ql-tooltip-editor input[type=text] {
    background: #444;
    border: none;
    color: #fff;
    font-size: 13px;
    height: 100%;
    outline: none;
    padding: 10px 20px;
    position: absolute;
    width: 100%;
    bottom: -120%;
}

.ql-bubble .ql-editor code {
    background-color: #9E9E9E;
}

.ql-container.ql-bubble:not(.ql-disabled) a:not(.ql-close) {
    color: #03A9F4;
    white-space: normal;
}

.ql-editor.ql-blank::before {
    font-size: 16px;
    line-height: 1.5;
    font-style: normal;
    caret-color: rgba(255, 255, 255, 0.81);
    color: rgba(255, 255, 255, 0.81);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.282);
}

.ql-container {
    font-size: 16px;
}

.hidden {
    display: none;
}

/* Hidden Markdown Storage */
#noteMarkdownStorage {
  display: none;
}

.lunote-page-controls {
    height: 117px;
}

.logout-btn {
  position: absolute;
  bottom: 20px; /* Adjust distance from bottom */
  left: 20px; /* Adjust distance from left */
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.5s;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.logout-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.saving-icons {
    display: flex;
    align-items: center;
}
.base-svg {
    font-size: 25px;
    width: 25px;
    height: 25px;
    color: rgb(239, 243, 244);
}

.p-0 {
    padding: 0;
}

.dropdownMenu-1 {
    position: absolute;
    right: 0px;
    margin-top: 0.5rem;
    width: 14rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px;
    border: 1px solid rgb(209, 213, 219);
    display: none;
    z-index: 50;
}

body.dark-theme .dropdownMenu-1 {
    background: var(--luna-theme-background-color-primary);
}

.modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    .modal-box {
      background: #fff;
      border-radius: 10px;
      max-width: 420px;
      width: -webkit-fill-available;
      padding: 20px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
body.dark-theme .modal-box {
    background: var(--luna-theme-background-color-primary);
}

    .modal-header {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 15px;
    }

    .modal-input {
      width: -webkit-fill-available;
      padding: 10px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 6px;
      margin-bottom: 20px;
    }
    
body.dark-theme .modal-input {
    background: var(--luna-theme-background-color-primary);
}

    .modal-body {
      margin-bottom: 25px;
    }

    .modal-body-container {
      margin-bottom: 20px;
    }

    .modal-body-container-p {
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 8px;
    }

    .modal-body-container-p-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      border-radius: 6px;
      transition: background 0.5s;
    }
    
body.dark-theme .modal-body-container-p-inner:hover {
    background: #212121;
}

    .modal-avatar-group {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .modal-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background-color: #ccc;
    }

    .modal-user-info {
      font-size: 13px;
    }

    .modal-user-info span {
      display: block;
      font-size: 11px;
      color: #777;
    }

    .modal-icons {
      display: flex;
      gap: 8px;
      color: #555;
      font-size: 14px;
    }

    .modal-general-access {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px;
      border: 1px solid #ddd;
      border-radius: 6px;
      transition: 0.5s ease;
    }
    
    .modal-general-access:hover {
        background: rgba(140,140,140,.15);
    }

    .modal-general-access-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .modal-globe-icon {
      background-color: #34a853;
      color: #fff;
      font-size: 12px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .modal-access-dropdown {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    
    .modal-access-description {
      font-size: 11px;
      color: #777;
      margin-left: 4px;
    }

    .modal-access-text {
      font-size: 13px;
    }

    .modal-access-text span {
      display: block;
      font-size: 11px;
      color: #777;
    }

    .modal-select {
      font-size: 13px;
      padding: 4px 6px;
      border-radius: 6px;
    }
    
.modal-access-select,
.modal-role-select {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border-radius: 6px;
  /*padding: 6px 10px;*/
  font-size: 13px;
    width: min-content;
    transition: 0.5s ease;
}

.modal-access-select:hover, .modal-role-select:hover {
    background: rgba(140,140,140,.15);
}

.modal-access-select-selected,
.modal-role-select-selected {
  display: block;
  padding: 6px 4px;
}

.modal-access-select-options,
.modal-role-select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: fit-content;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.modal-access-readonly,
.modal-role-readonly {
  pointer-events: none;
  padding: 6px 4px;
  opacity: 0.7;
}

body.dark-theme .modal-access-select-options,
body.dark-theme .modal-role-select-options {
    background: #2a2a2a;
}

.modal-access-select-options li,
.modal-role-select-options li {
  padding: 6px 10px;
  cursor: pointer;
  transition: 0.5s ease;
}

.modal-access-select-options li:hover,
.modal-role-select-options li:hover {
  background: #f0f0f0;
}

body.dark-theme .modal-access-select-options li:hover,
body.dark-theme .modal-role-select-options li:hover {
  background: #353535;
}

    
body.dark-theme .modal-select {
    color: var(--luna-theme-color-primary);
    background: var(--luna-theme-background-color-primary);
}


    .modal-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-copy-link {
      color: #1a73e8;
      border: 1px solid #747775;
      font-size: 13px;
      cursor: pointer;
      padding: 10px 16px;
      border-radius: 9999px;
      transition: 0.2s ease;
    }
    
    .modal-copy-link:hover {
      background: rgb(224 235 255);
    }

    body.dark-theme .modal-copy-link:hover {
      background: rgb(29 42 65);
    }

    .modal-done-button {
      background-color: #1a73e8;
      color: white;
      padding: 8px 16px;
      border-radius: 6px;
      border: none;
      cursor: pointer;
      font-size: 13px;
    }

    .modal-done-button:hover {
      background-color: #1669d2;
    }
    
.dom {
    display: none;
}

.dopc {
    display: flex;
}
@media screen and (max-width: 768px) {
    .dom {
        display: flex;
    }
    
    .dopc {
        display: none;
    }
}

@media screen and (max-width: 500px) {
    .lunote-page-controls {
        height: 60px;
    }
}
