/*p#crawl-log {
    display: none;
} */

.pagination {

    justify-content: flex-start!important; /* Allinea gli elementi a sinistra */
 
}

span.text-ext {
    font-size: 13px;
    color: #303030;
    font-weight: 500;
    font-family: 'Inter';
}

.crawl-modal-content h2 {
  color: #333;
  font-size: 15px !important;
  margin-bottom: 20px;
  font-family: inter !important;
}

.drop-area p {
    margin: 0px;
    color: #4e4e4e;
    font-family: 'Inter';
    font-size: 15px;
}

.error-message {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #f44336;
    color: #333;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.error-message::before {
    content: "\26A0";
    font-size: 18px;
    color: #f44336;
    margin-right: 10px;
    flex-shrink: 0;
}

.error-message p {
    margin: 0;
    padding: 0;
}

.error-message a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline;
}

.error-message a:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* Rimuovi stili aggiuntivi che potrebbero causare la duplicazione */
.error-message > .error-message {
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.error-message > .error-message::before {
    display: none;
}
/* General styles */
#crawl-status:not(:empty) ~ #crawl-log,
#crawl-log:not(:empty) ~ #crawl-status {
    display: none!important;
}

p#crawl-log {
    font-weight: 600;
    color: #303030;
    font-size: 13px;
}


.content-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
  border-radius: 10px;
  border-bottom: solid 1px #d6d6d6;
}

.sidebar-container {
  width: 25%;
  background-color: white;
  padding: 1.5rem;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  min-height: 300px;
  max-height: 600px;
}

.main-container {
  flex-grow: 1;
  padding: 0px 70px;
  overflow-y: auto;
  border-left: solid 1px #ECECEC;
}

/* Document creation styles */
.document-creation {
  font-family: 'Inter', sans-serif;
  margin-bottom: 2rem;
}

.document-creation h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #303030;
}

.document-creation p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.creation-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.option {
  width: 100%;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option:hover, .option.active {
  border-color: #0166E4;
  background-color: #e1efff;
}

.option i {
  font-size: 24px;
  color: #0166E4;
  margin-bottom: 10px;
}

.option h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #303030;
}

.option p {
  font-size: 12px;
  color: #666;
}

/* Upload area styles */
.drop-area {
  border: 2px dashed #ccc;
  border-radius: 20px;
  width: 100%;
  padding: 42px;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
  font-family: inter;
  color: #6f6f6f;
  font-size: 15px;
  min-height: 114px;
}

.drop-area p { 
  margin: 0px;
}

.drop-area.highlight {
  border-color: #0166E4;
  background-color: #f0f8ff;
}

/* Website URL input styles */
#website-url-input {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

#website-url-input label {
  font-size: 13px;
  color: #303030;
  margin-right: 0.5rem;
}

#website-url-input input[type="url"] {
  flex-grow: 1;
  padding: 0.5rem;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

#crawl-website {
    padding: 8px 16px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 13px;
}

#crawl-website:hover {
  background-color: #1737eb !important;
}

/* Form styles */
#kb-upload-form {
  margin-bottom: 2rem;
  font-family: "Inter", Sans-serif;
  color: #091625;
}

#kb-upload-form input[type="file"] {
  background-color: #ebf4ff;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  color: #091625;
  margin-right: 14px;
  margin-top: 36px;
}

#kb-upload-form input[type="submit"] {
  background-color: #0166E4;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 0.375rem;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: "Plus Jakarta Sans", Sans-serif;
  display: none;
}

#kb-upload-form input[type="submit"]:hover {
  background-color: #499AFF;
}

/* Progress bar styles */
#progress-container {
  width: 400px;
  height: 20px;
  background-color: #f3f3f3;
  display: none;
}

#progress-bar {
  width: 70%;
  height: 30px;
  background-color: #5873bc;
  position: relative;
  border-radius: 10px;
  margin-bottom: 20px;
  float: right;
}

#progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
}

/* Crawl modal styles */
#crawl-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.crawl-modal-content {
  background-color: #ffffff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  max-width: 500px;
  font-family: 'Inter', sans-serif;
}


.crawl-progress {
  width: 100%;
  background-color: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  height: 8px;
  margin-bottom: 15px;
}

#crawl-progress-bar {
  width: 0%;
  height: 100%;
  background-color: #2563EB;
  transition: width 0.3s ease;
}

#crawl-status {
  font-size: 13px;
  color: #4a5568;
  margin-bottom: 15px;
}

#crawl-success-message {
  color: #2563EB;
  font-size: 15px;
  font-weight: 500;
  margin-top: 15px;
  display: none;
}

#crawl-reload {
  background-color: #2563EB;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#crawl-reload:hover {
  background-color: #1d4ed8;
}

/* Folder and file styles */
#folder-search-container, #search-container {
  margin-bottom: 1rem;
}

input#folder-search {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e8e8e8;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inter;
}

#file-search {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e8e8e8;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: "Inter";
}

.folders-list {
  margin-top: 1rem;
  height: auto;
}

.folder-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-right: 30px;
}

.folder-item.selected {
  background-color: #f0f0f0;
  padding-left: 10px;
  padding-right: 10px;
}

.folder-name {
  flex-grow: 1;
  font-size: 13px;
  font-weight: 400;
  color: #424242;
  padding-left: 10px;
  font-family: inter;
}

.icon-folder {
  display: flex;
  float: right;
}

.rename-folder, .delete-folder {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0px 3px;
  color: #404040;
  margin-left: 10px;
  font-size: 14px;
}

.rename-folder:hover, .delete-folder:hover {
  color: black !important;
  outline: none!important;
  background-color: transparent !important;
}

#files-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  padding: 0px 24px;
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
  min-height: 00px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ececec;
  height: 50px;
}

.file-name {
  flex-grow: 1;
  font-size: 0.875rem;
  font-family: inter;
  color: #262626;
}

.progress-container {
  width: 35%!important;
  margin-right: 1rem!important;
}

.progress-bar {
  height: 0.5rem!important;
  border-radius: 0.25rem!important;
  background-color: #007bff!important;
}

.action-buttons {
  display: flex;
  width: 15%;
}

.rename-button, .delete-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: #3c3c3c;
  margin-left: 10px;
}

.rename-button:hover, .delete-button:hover {
  background-color: white !important;
}

.progress-text {
  position: absolute!important;
  width: 100%;
  text-align: left;
  color: #737373;
  padding-top: 26px;
  font-size: 12px;
  font-family: 'Inter';
}

.rename-button:before {
  content: "";
  background-image: url('https://app.artiko.ai/wp-content/plugins/knowledge-base/file-edit.png');
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 5px;
}

.delete-button:before {
  content: "";
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
  background-image: url('https://app.artiko.ai/wp-content/plugins/knowledge-base/trash.png');
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

/* Modal styles */
.modal, .modal-delete {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.modal-content, .modal-delete-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 10px;
}

.close-delete {
  color: #0e0e0e;
  float: right;
  font-size: 19px;
  font-weight: bold;
  cursor: pointer;
  font-weight: 400;
  margin-top: -18px;
  margin-right: -10px;
}

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

button#confirmDeleteFileButton {
  font-family: 'Inter';
  font-size: 14px;
  font-weight: 400;
}

#renameFileButton:hover, .confirm-delete-button:hover {
  background-color: #167dff !important;
}

input#newFileName:focus-visible {
  outline-color: #63a2ff;
}

#newFileName {
  width: 100%;
  padding: 0.5rem;
  margin: 1rem 0;
  border: 1px solid #c5c5c5 !important;
  border-radius: 0.375rem;
  font-size: 14px;
  font-family: 'Inter';
}

#renameFileButton, .confirm-delete-button {
  background-color: #0166E4;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  font-family: "Plus Jakarta Sans", Sans-serif;
}

#renameFileButton:hover, .confirm-delete-button:hover {
  background-color: #0051b7;
}

/* Pagination styles */
#folder-pagination, #file-pagination {
  text-align: center;
  margin-top: 10px;
}

#folder-pagination button, #file-pagination button {
  background-color: #0166E4;
  color: white;
  border: none;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 0.25rem;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: 'Plus Jakarta Sans', Sans-serif;
}

#folder-pagination button:hover, #file-pagination button:hover {
  background-color: #0051b7;
}

#folder-pagination button:disabled, #file-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fi.fi-rr-arrow-small-left {
  padding-right: 5px;
  padding-top: 5px;
}

.initial-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  position: absolute;
  top: 0;
  margin: 2px 0px 20px 0px;
  width: 75%;
  bottom: 0;
  z-index: 1;
  font-weight: 400;
  font-size: 15px;
  font-family: inter;
  color: #404040;
  max-height: 600px;
  min-height: 300px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.initial-layer .fa-arrow-left {
  margin-right: 10px;
}

.folder-item.selected .initial-layer {
  display: none;
}

/* Icon styles */
i.fi.fi-rr-folder {
  color: #535353;
}

div.image {
  max-width: 16px;
  margin-right: 7px;
}

/* Additional styles */
.page-id-1251 [type="button"]:focus, 
.page-id-1251 [type="button"]:hover, 
.page-id-1251 [type="submit"]:focus, 
.page-id-1251 [type="submit"]:hover, 
.page-id-1251 button:focus, 
.page-id-1251 button:hover {
  background-color: transparent !important;
  text-decoration: none;
}

.modal-backdrop {
  z-index: 0;
}

.kb-modal {
  z-index: 9;
}

li.page-item.active {
  background-color: #fff!important;
}

.sidebar-container .elementor-kit-5 a, 
.main-container .elementor-kit-5 a, 
.page-link {
  font-family: "inter" !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  border: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .main-container {
    display: none;
  }
  .main-container.visible {
    display: block;
  }

  .sidebar-container, .main-container {
    width: 100%;
    max-height: none;
    overflow-y: visible;
    padding: 0px 10px;
  }

  .sidebar-container {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none!important;
  }

  .main-container {
    border-left: none;
  }

  /* Folder management optimization */
  .folders-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    flex-direction: column;
  }
  .sidebar-container {
    width: 25%;
    background-color: transparent;
  }

  .folder-item {
    margin-bottom: 0px;
    padding: 0px 0px 0px 10px;
    box-sizing: border-box;
    flex-direction: row;
    align-items: first baseline;
    background-color: white;
    margin-top: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.37);
  }
  
  .folder-item.selected {
    background-color: #e3e3e3 !important;
  }

  .folder-name {
    width: 100%;
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
  }

  .icon-folder {
    width: 100%;
    justify-content: right;
    margin-top: 5px;
  }

  #kb-create-folder-button {
    width: 100%;
    background-color: transparent !important;
    margin-bottom: 15px;
    padding: 11px 11px 11px 3px!important;
    font-size: 14px;
    text-align: left!important;
  }

  #folder-search-container {
    margin-bottom: 15px;
  }

  input#folder-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
  }

  /* Upload form optimization */
  .drop-area {
    padding: 20px;
    margin: 10px 0;
  }

  #kb-upload-form input[type="file"] {
    width: 100%;
    margin-top: 20px;
    margin-right: 0;
  }

  #kb-upload-form input[type="submit"] {
    width: 100%;
    margin-top: 10px;
  }

  /* File list optimization */
  #files-container {
    padding: 10px;
    background-color: transparent;
    border-radius: 0.5rem;
    box-shadow: none;
    padding: 0px;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
  }

  .file-item {
    flex-wrap: inherit;
    max-height: 38px;
    padding: 23px 10px 20px 10px !important;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.37);
  }

  .file-name {
    width: 100%;
    margin-bottom: 10px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }

  .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  /* Search and pagination optimization */
  #search-container,
  #folder-pagination,
  #file-pagination {
    margin-bottom: 1rem;
  }

  #file-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
  }

  /* Pagination improvement on mobile */
  #folder-pagination ul,
  #file-pagination ul {
    display: flex;
    justify-content: center;
    padding: 0;
  }

  #folder-pagination li,
  #file-pagination li {
    margin: 0 5px;
  }

  /* Modal optimization */
  .modal-content,
  .modal-delete-content {
    width: 90%;
    margin: 10% auto;
  }

  #kb-create-folder-modal .kb-modal-content {
    width: 90%;
    padding: 15px;
  }

  #kb-create-folder-form input[type="text"],
  #kb-create-folder-form input[type="submit"] {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 16px;
  }

  /* Touch button accessibility improvement */
  .rename-button,
  .delete-button,
  .rename-folder,
  .delete-folder {
    padding: 10px;
  }

  /* Hide non-essential elements on mobile */
  .initial-layer {
    display: none;
  }

  /* Adjustments for new document creation layout */
  .creation-options {
    flex-direction: column;
  }

  .option {
    width: 100%;
    margin-bottom: 10px;
  }

  #website-url-input {
    flex-direction: column;
    align-items: stretch;
  }

  #website-url-input label,
  #website-url-input input[type="url"],
  #crawl-website {
    margin-bottom: 10px;
    margin-right: 0;
  }

  .crawl-modal-content {
    width: 90%;
  }
}

/* Improvements for very small screens */
@media (max-width: 480px) {
  .folder-item,
  .file-item {
    font-size: 14px;
  }

  .folder-item {
    width: 100%; /* Switch to single column display */
  }

  .action-buttons {
    flex-direction: row;
    justify-content: end;
  }

  .rename-button,
  .delete-button {
    margin: 5px;
  }
}