@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400&display=swap');
@import url('./themes.css');

* {
    box-sizing: border-box;
}

/* =====================
   Layout
   ===================== */
body {
    margin: 0;
    color: var(--font-primary);
    overflow: hidden;
    font-family: 'Noto Serif JP', serif;
    background-color: var(--bg-primary);
}

main {
    display: flex;
}

input:focus {
    outline: none;
}

hr {
    width: 100%;
    border: none;
    border-top: 1px solid var(--border-default);
}

a {
    color: var(--gold);
}

/* =====================
   Navigation
   ===================== */
#nav-bar {
    height: 100vh;
    min-width: 60px;
    margin: 0;
    padding: 5px;
    background-color: var(--bg-tertiary);
    list-style: none;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-tertiary);
}

.nav-item {
    width: 50%;
    aspect-ratio: 1;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 5px;
}

.nav-item:hover {
    cursor: pointer;
    background-color: var(--bg-secondary);
}

#open-files-btn {
    background-image: url('../assets/logo.svg');
    width: 50px;
}

#visualizer-btn {
    background-image: url('../assets/visualizer.svg');
}

#daily-note-btn {
   background-image: url('../assets/dailynote.svg'); 
}

/* =====================
   File Display
   ===================== */
#file-display {
    height: 100vh;
    width: auto;
    background-color: var(--bg-primary);
    flex: 1;
}

#tab-bar {
    background-color: var(--bg-tertiary);
    height: 40px;
    width: 100%;
    padding: 0;
    padding-left: 15px;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: end;
    justify-content: flex-start;
    position: relative;
    z-index: 100;
    overflow: visible;
    border-bottom: 1px solid var(--border-tertiary);
}

.tab-card {
    background-color: var(--bg-tertiary);
    width: 150px;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: none;
    font-size: 0.8rem;
    overflow-x: visible;
    position: relative;
    color: var(--font-secondary);
}

.tab-card:hover {
    cursor: pointer;
    color: var(--font-primary);
}

.current-tab {
    background-color: var(--bg-primary);
    color: var(--gold);
    height: calc(80% + 2px);
    margin-bottom: -2px;
    border-bottom: 2px solid var(--accent);
    z-index: 2;
    border-top-right-radius: 2px;
    border-top-left-radius: 2px;
    border-top: none;
    border-left: none;
    border-right: none;
}

.current-tab::before,
.current-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    width: 10px;
    height: 10px;
    background-color: transparent;
    pointer-events: none;
}

.current-tab::before {
    left: -10px;
    box-shadow: 5px 5px 0 0 var(--bg-primary);
    border-radius: 0 0 6px 0;
}

.current-tab::after {
    right: -10px;
    box-shadow: -5px 5px 0 0 var(--bg-primary);
    border-radius: 0 0 0 6px;
}

.current-tab button {
    background-color: var(--bg-primary);
    color: var(--font-tertiary);
}

.close-tab-btn {
    background-color: inherit;
    color: transparent;
    border: none;
    font-size: 0.7rem;
}

.tab-card:hover .close-tab-btn,
.current-tab .close-tab-btn {
    color: var(--font-tertiary);
}

.close-tab-btn:hover {
    cursor: pointer;
    color: var(--font-primary) !important;
}

#current-tab {
    height: calc(100vh - 40px);
    position: relative;
    padding-bottom: 50px;
    background-color: var(--bg-primary);
}

.persistent-title {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    background-color: var(--bg-primary);
    transform: translateX(-50%);
    font-size: 0.85rem;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--font-tertiary);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 0.05em;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.tab::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.tab {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}  


/* =====================
   Search Menu
   ===================== */
#search-menu {
    background-color: var(--bg-secondary);
    height: 300px;
    width: 500px;
    overflow: hidden;
    padding: 25px;
    justify-content: center;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#close-search-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--font-secondary);
    cursor: pointer;
}

#close-search-btn:hover {
    color: var(--font-primary);
}

#search-bar {
    color: var(--font-primary);
    width: 100%;
    height: 30px;
    background-color: var(--bg-tertiary);
    border-radius: 2px;
    border: 1px solid var(--border-default);
    font-size: 0.95rem;
    padding: 5px 10px;
    caret-color: var(--caret);
}

#search-results {
    margin-top: 5px;
    width: 100%;
    height: 90%;
    overflow-y: scroll;
}

.search-result {
    padding: 10px;
    height: 50px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: start;
    font-size: 0.9rem;
    border-radius: 2px;
    color: var(--font-primary);
}

.search-result:hover {
    background-color: var(--bg-tertiary);
    cursor: pointer;
}

.search-result-img {
    height: 100%;
    opacity: 0.6;
}

.search-result-date-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    gap: 5px;
    color: var(--font-secondary);
    font-size: 0.8rem;
}

/* =====================
   Default Page
   ===================== */
.default-page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 8px;
}

.default-page-text {
    color: var(--font-tertiary);
    z-index: 3;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* =====================
   Editor
   ===================== */
.tab {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    overflow-y: scroll;
    padding-top: 40px;
}

.note-title {
    height: 100px;
    background-color: var(--bg-primary);
    color: var(--font-primary);
    font-size: 1.5rem;
    padding-left: 50px;
    border: none;
    font-family: 'Noto Serif JP', serif;
    caret-color: var(--caret);
    width: 900px;
}

.note-body {
    height: calc(100% - 100px);
    background-color: var(--bg-primary);
    border: none;
    color: var(--font-primary);
    font-size: 1rem;
    padding: 0 50px 50px 50px;
    flex-direction: column;
    font-family: 'Noto Serif JP', serif;
    caret-color: var(--caret);
    line-height: 1.8;
    resize: none;
    width: 900px;
}

.note-body:focus {
    outline: none;
}

/* =====================
   Count Holder
   ===================== */
.count-holder {
    position: fixed;
    bottom: 0;
    right: 0;
    border: 1px solid var(--border-secondary);
    border-bottom: none;
    border-right: none;
    height: 25px;
    width: 200px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: var(--bg-secondary);
    font-size: 0.75rem;
    border-top-left-radius: 2px;
    color: var(--font-tertiary);
}

.note-mode-img {
    height: 60%;
    aspect-ratio: 1;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.note-mode-img.display-mode {
    background-image: url('../assets/eye.svg');
}

.note-mode-img.edit-mode {
    background-image: url('../assets/edit.svg');
}

/* =====================
   Search Create Note
   ===================== */
.menu-create-note-btn {
    color: var(--gold);
    border: 1px solid var(--border-default);
    height: 100%;
    width: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    border-radius: 2px;
}

.menu-create-note-btn:hover {
    background-color: var(--gold-subtle);
}

/* =====================
   Quick Capture
   ===================== */
.quick-capture {
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    z-index: 99;
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.quick-capture input {
    background-color: var(--bg-primary);
    border: none;
    border-bottom: 1px solid var(--border-default);
    padding: 5px;
    color: var(--font-primary);
    width: 100%;
    caret-color: var(--caret);
    font-family: 'Noto Serif JP', serif;
}

#settings {
    height: 800px;
    width: 600px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-default);
    color: var(--font-primary);
}

#settings-btn {
    background-image: url('../assets/settings.svg');
    background-position: center;
    background-size: contain;
}

input[type="checkbox"]:hover {
    cursor: pointer;
}
