.folder {
    cursor: pointer;
}
.accordion-content, .templates, .options {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accordion-content {  
  border-top: 1px solid var(--disabled-grey);
  border-bottom: 1px solid var(--disabled-grey);
  position: relative;
  z-index: 1;
  background-color: var(--primary-color-5-opacity);
  display: flex;
  flex-direction: column;
}

.folder.accordion:last-of-type .accordion-content {
  border-bottom: none;
}

.first-template-title.expanded ~ .templates, .first-template-title.expanded ~ .options {
    visibility: visible;
    transition: all .4s ease-in-out;
    max-height: 1000px;
    overflow-y: auto;
}

.first-template-title.expanded ~ .templates {
  overflow-y: auto;
}

.first-template-title.expanded .ico-chevron {
    transform: rotate(-180deg);
    margin-right: 22px;
}

.accordion.expanded .ico-chevron {
  transform: rotate(-180deg);
}

.accordion.expanded, .accordion.expanded:hover {
    background-color: var(--primary-color-5-opacity);
}

.first-template-title.expanded ~ .templates .accordion.expanded > .accordion-content {
    visibility: visible;
    transition: all .4s ease-in-out;
    background-color: var(--main-light);
    max-height: 220px;
    overflow-y: scroll;
}

.template-title {
    margin: .6rem .5rem;
    font-family: var(--p-font-family);
    letter-spacing: normal;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 100px); /* Adjust the value as needed */
  }

.accordion-title, .ui-menu .ui-menu-item  {
  clear:both;
  margin-right: 0;
  margin: 0rem 1rem 1rem 1rem;
  padding-top:1rem;
  padding-bottom:0;
  font-family: var(--p-font-family);
  letter-spacing: normal;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display:flex;
  position: relative;
}

.accordion.option {
  clear: both;
  margin-right: 2rem;
  padding: 1.5rem;
  margin: 0;
  font-family: var(--p-font-family);
  letter-spacing: normal;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  position: relative;
  cursor: pointer;
  align-items: center;
}

.accordion.option i{
  padding-right:8px;
}

.overflow-controller {
    margin: 0;
}

.first-template-title {
  margin-right: 2rem;
  padding: 0 0 0 1rem;
  font-family: var(--p-font-family);
  letter-spacing: normal;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display:flex;
  align-items: center;
  cursor: pointer;
  height: 48px;
  width: 100%;
}

.select.select-template .first-template-title {
  margin-right: 2rem;
  margin: 0 1rem 0 1rem;
  font-family: var(--p-font-family);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display:flex;
  align-items: center;
  cursor: pointer;
  height: 48px;
  width: calc(530px - 2.5rem);
}

.first-template-title .overflow-controller .title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis !important;
  max-width: 93%;
}

.select {
    display:block;
    max-width:550px;
    position: relative;
    background-color: var(--primary-color-10-opacity);
    color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 0.25rem .5rem;
    width: 100%;
    font-size: 1rem;
    height: 56px;
}

.select::after {
    color: var(--p-color);
    display: block;
    content: "";
    border-bottom: var(--border-outline);
    border-left: var(--border-outline);
    width: 0.5rem;
    height: 0.5rem;
    transform: rotate(-45deg);
    margin-right: 1.5rem;
    pointer-events: none;
    position: absolute;
    right: 0;
    bottom: 1.35rem;
    font-size: 1rem;
  }

.document-type {
  margin-right: 0;
  padding: 0;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  min-width: 16px;
}

.document-type .ico {
    top: 2px;
    position: relative;
}

.first-template-title .ico-chevron {
  margin-right: 22px;
}

.first-template-title .overflow-controller .ico-chevron{
  margin-right: 22px;
}

.accordion-content-item, .overflow-controller {
    display: flex;
    align-items: center;
    position: relative;
    clear: both;
    background-color: var(--main-light);
    z-index: 1;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    min-height: 48px;
  }

  .overflow-controller {
    padding:0;
    background-color: transparent;
  }

.accordion-content-item .template-title {
  max-width:calc(100% - 4rem);
  text-overflow: ellipsis;
}

.ico-chevron {
  position:absolute;
  right:0;
  margin-right: 4px;
  transform: rotate(0deg);
  transition: all .4s ease;
  color: #999;
}

.from-scratch {
    cursor: pointer;
}

.from-scratch .accordion-title {
    padding-bottom: 1rem;
    margin-top:.4rem;
    margin-bottom:0;
}

.from-scratch i.ico.ico-edit::before {
  position: relative;
  top: 2px;
}

.accordion:hover, .accordion.active, .ui-menu .ui-menu-item:hover, .ui-menu .ui-menu-item.active {
    background-color: var(--primary-color-10-opacity);
}
.accordion-content-item:hover, .accordion-content-item.active {
    background-color: var(--primary-color-10-opacity);
}

.templates, .options {
    position: absolute;
    background: linear-gradient(0deg, rgba(18, 21, 25, 0.05) 0%, rgba(18, 21, 25, 0.05) 100%), #FFF;;
    z-index: 3;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    width: 100%;
    margin-top: 1.25rem;
    box-shadow: 0 8px 14px 0 #5267734b;
    left: 0;
}

.currency-select .first-template-title.expanded ~ .templates, .currency-select .first-template-title.expanded ~ .options  {
  max-height: 800px;
}

.folder-icon {
  --color: var(--info-blue);
  width:20px;
  height:16px;
  background: var(--color);
  display:inline-flex;
  border-radius: 0 2px 2px 2px;
  margin-right: 8px;
  position:relative;
  top:3px;
}

.folder-icon:before {
  width:9px;
  height: 2px;
  position:absolute;
  top:-2px;
  left:0;
  background: var(--color);
  display:block;
  content: "";
  border-radius: 2px 4px 0 0;
}

.folder-icon.orange {
  --color: #FF5100;
}

.folder-icon.purple {
  --color: var(--cta-block-background);
}

.folder-icon.green {
  --color: var(--success-green);
}

.folder-icon.red {
  --color: var(--error-red);
}

.d-none {
  display:none;
}