#snaatch-iframe-container,
#snaatch-folder-modal-bg {
  width: 100%;
  height: 100%;
  padding: 50px;

  position: absolute;
  left: 0;
  top: 0;
  z-index: 999;

  display: none;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(3px);
}

#snaatch-close-btn,
#snaatch-folder-modal-close-btn {
  width: 30px;
  height: 30px;

  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 999;

  background-color: rgba(255, 255, 255, 0.9);
  color: #344054;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

#snaatch-close-btn:hover,
#snaatch-folder-modal-close-btn:hover {
  background: #ffffff;
}

#snaatch-iframe {
  width: 100%;
  height: 100%;
}

#snaatch-folder-container {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: linear-gradient(180deg, #fafbfc 0%, #f3f5f8 100%);
  border: 1px solid #d8dde6;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  color: #0f172a;
}

#snaatch-folder-container h1,
#snaatch-folder-container h2 {
  margin: 0 0 12px;
  color: #101828;
  font-weight: 650;
}

#snaatch-folder-selector-wrapper {
  display: flex;
  flex-direction: row;
}

#snaatch-folder-selector-wrapper > * {
  flex: 1;
}

#snaatch-folder-selector {
  width: 400px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: clip;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 8px;
}

#snaatch-subfolder-form {
  display: flex;
  gap: 8px;
  flex-direction: column;
  padding-left: 16px;
  visibility: hidden;
}

#snaatch-subfolder-form h2 {
  margin-top: 0;
}

.snaatch-folder-wrapper .snaatch-folder-wrapper {
  padding-left: 24px;
}

#snaatch-add-folder-btn {
  background: #ffffff;
  color: #344054;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  width: 100%;
  padding: 10px;
  font-weight: 600;
}

#snaatch-folder-name-input {
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 10px;
  color: #101828;
}

#snaatch-folder-select-btn {
  background: #0f2d45;
  color: #ffffff;
  border: 1px solid #0f2d45;
  border-radius: 10px;
  width: 100%;
  padding: 10px;
  font-weight: 650;
}

#snaatch-folder-select-btn-path {
  margin: 16px 0;
}

#snaatch-folder-select-btn-path[data-path='undefined'] {
  visibility: hidden;
}

.snaatch-folder-wrapper {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.snaatch-folder-item {
  cursor: pointer;
  display: flex;
  padding: 2px 0;
  padding-left: 24px;
  border: 1px solid transparent;
}

.snaatch-folder-item .new-icon {
  display: none;
}

.snaatch-folder-item:hover .new-icon {
  display: block;
}

.snaatch-folder-item span {
  flex: 1;
}

.snaatch-folder-item:hover,
.snaatch-folder-item[data-selected='true'] {
  background-color: #eef2f7;
  border-radius: 10px;
}

.snaatch-folder-item[data-selected='true'] {
  border: 1px solid #0f2d45;
}

.snaatch-folder-item[data-has-children='true'] {
  padding-left: 0;
}

.snaatch-folder-item *:not(div) {
  pointer-events: none;
}

ul[data-children-visible='false'] > ul {
  display: none;
}

ul[data-children-visible='true'] > ul {
  display: block;
}

.snaatch-folder-collapse-btn * {
  pointer-events: none;
}

.folder-icon,
.chevron-right-icon,
.chevron-down-icon,
.new-icon {
  width: 16px;
  height: 16px;
  padding-right: 8px;
  pointer-events: none;
  box-sizing: content-box;
}

.folder-icon * {
  fill: #344054;
}

#snaatch-loader {
  width: 80px;
  display: none;
}

#snaatch-folder-container.loading {
  display: flex;
  justify-content: center;
  align-items: center;
}

#snaatch-folder-container.loading > :not(#snaatch-loader) {
  display: none;
}

#snaatch-folder-container.loading > #snaatch-loader {
  display: block;
}

/* Download Progress Styles */
#snaatch-download-progress {
  margin: 20px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

#snaatch-download-progress h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1em;
}

.snaatch-progress-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.snaatch-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #dfbc5f 0%, #e8c66f 50%, #dfbc5f 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

#snaatch-progress-text {
  text-align: center;
  color: #6c757d;
  font-weight: 500;
  font-size: 0.9em;
}

#snaatch-current-chunk,
#snaatch-total-chunks {
  font-weight: bold;
  color: #dfbc5f;
}
