/* General */

html, body {
  height: 100%;
  margin: 0;
  background-color: var(--grey-1000);
}

ol {
  list-style-type: decimal;
}

ul {
  list-style-type: disc;
}

.app-wrapper {
  display: flex;
}

.primary-btn {
  align-items: center;
  background-color: var(--orange);
  border: none;
  padding: 11px 11px;
  border-radius: 4px;  
  display: flex;
  gap: 8px;
  justify-content: center;
}

.primary-btn:hover {
  background-color: var(--orange-hover);
}

.primary-btn, .hdr-del-icon, #hdr-menu-icon, .sb-doc-wr, .preview-icon{
  cursor: pointer;
}

/* Sidebar */
#sb-wr {
  min-width: 250px;
  background-color: var(--grey-900);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 23px;
  box-sizing: border-box;
  display: none;
}

.sb-doclist-wr {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sb-title-wr {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-top: 0.5em;
}

.sb-title {
  margin-top: 6px;
  margin-bottom: 23px;
}

#newdoc-btn {
  width: 100%;
  margin-bottom: 40px;
}

.sb-doc-wr {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

.sb-doc-date-time-wr {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.sb-doc-document-icon {
  margin-right: 11px;
}

.sb-doc-details-wr {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 0px;
  word-wrap: break-word; 
  overflow-wrap: break-word; 
  width: 100%;
  justify-content: center;
}

.sb-theme-wr {
  margin: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sb-doc-name {
  word-wrap: break-word; 
  overflow-wrap: break-word;
  max-width: 100%;
}

.sb-doc-wr:hover .sb-doc-name {
  color: var(--orange);
}

/* Header */

#hdr-wr {
  height: 3.5em;
  display: flex;
  background-color: var(--grey-800);
  max-width: 100%;
}

.hdr-menu-icon-wr {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--grey-700);
  padding: 0 0.8em;
}

.hdr-menu-icon-wr:hover {
  background-color: var(--orange);
}

.hdr-menu-icon {
  width: 23px;
  height: 14px;
}

.hdr-main-col1-wr {
  display: flex;
  align-items: center;
}

#hdr-title-wr {
  border-right: 1px solid var(--grey-600);
  height: 100%;
  display: flex;
  align-items: center;
  margin-left: 20px;
}

h1 {
  padding: 0 20px 0 0;
}

.hdr-main-col2-wr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  padding-left: 10px;
  width: 100%;
}

.hdr-doc-wr {
  display: flex;
  align-items: center;
}

.hdr-doc-icon {
  width: 14px;
  height: 16px;
}

.hdr-doc-details-wr {
  margin-left: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hdr-doc-title {
  display: none;
}

.hdr-doc-btns-wr {
  display: flex;
  align-items: center;
  gap: 22px;
}


#save-doc-btn {
  display: flex;
  gap: 7px;
  padding: 11px 15px;
}

#export-file {
  display: none;
}

.hdr-doc-name {
  background-color: var(--grey-800);
  border: none;
  width: 100px;
}

.hdr-doc-wr:hover .hdr-doc-name {
  color: var(--orange);
}

.hdr-doc-name:focus {
  outline: none;
  border-bottom: 1px solid #979797;
}

.hdr-del-icon:hover {
  fill: var(--orange)
}



/* Main */

.app-wrapper {
  display: flex;
  max-width: 100vw;
  overflow-x: hidden; 
  min-height: 100vh;
}

#main-wr {
  display: flex;
  height: 100%;
}

.main-wrapper {
  display: flex;
  flex-grow: 1; 
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
}

.markdown-col,
.preview-col {
  flex-grow: 1; 
  flex-basis: 0; 
  max-width: 50%; 
  min-width: 0; 
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.markdown-col {
  max-width: 100%;
}

.preview-col {
  display: none;
}

.markdown-col {
  border-right: var(--grey-600) solid 1px;
}

.main-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 17px;
  background-color: var(--grey-900);
}

#markdown-input {
  width: 100%;
  height: 100%;
  resize: none;
  font-family: 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    color: var(--grey-400);
    background-color: var(--grey-1000);
    border: none;
    outline: none;
    overflow: visible;
}

#markdown-input {
  overflow: auto; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

#markdown-input::-webkit-scrollbar {
  width: 0;
  background: transparent; 
}

.preview-hdr-wr {
  display: flex;
  justify-content: space-between;
}

.markdown-content, .preview-content {
  flex-grow: 1;
  padding: 15px;
  background-color: var(--grey-1000);
}

.preview-content {
  padding: 25px;
}

/* Modal */

#delete-modal-window {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.1); 
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
}

.delete-modal-content-wr {
  background-color: var(--grey-900);
  margin: 200px auto;
  padding: 0.5em;
  width: 80%;
  border-radius: 4px;
  opacity: 1;
}

.delete-modal-details-wr {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#delete-modal-close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.delete-modal-wr {
  width: 343px;
  background-color: var(--grey-900);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 4px;
  margin: 10% auto;
}

.delete-modal-title {
  font-family: 'Roboto Slab', serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.delete-modal-msg {
  font-family: 'Roboto Slab', serif;
  font-size: 14px;
  color: var(--grey-400);
  line-height: 24px;
}

/* Pop up message */ 

#popup-container {
  display: none;
  position: fixed;
  top: 36px;
  right: 130px;
  transform: translate(-50%, -50%);
  background-color: var(--grey-1000);
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  z-index: 9999;
}

#popup-message {
  font-size: 14px;
  font-family: 'Roboto Slab', serif;
}

.fade-out {
  animation: fadeOut 2s;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}










/*######################## MISC ############################*/

/* Scroll Bar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--grey-700);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--orange-hover);
}


/* The switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 22px; 
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider (background) */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--grey-600);
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 22px; 
  width: 45px;
  height: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px; 
  width: 14px; 
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(22px); 
  -ms-transform: translateX(22px); 
  transform: translateX(22px); 
}

.slider.round {
  border-radius: 22px; 
}

.slider.round:before {
  border-radius: 50%;
}


@media (min-width: 768px) {
  
  #markdown-preview-icon {
    display: none;
  }
  
  .hdr-doc-title{
    display: flex;
  }

  .hdr-doc-name {
    width: 250px;
  }

  #hdr-wr {
    height: 4.2em;
  }

  #export-file {
    display: flex;
  }
  
  .markdown-col, .preview-col {
    max-width: 50%;
    display: flex;
  }

  .delete-modal-content-wr {
    max-width: 350px;
    padding: 1em;
  }
}


  