/**
 * ==========================================================================
 *  Propify Drives - Front Styles
 *  Local: assets/front/front.css
 * ==========================================================================
 */

/* ---------- Reset local / wrappers reais dos shortcodes ---------- */

.propify-upload,
.propify-download {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji",
               "Segoe UI Emoji";
  color: #222;
}

.propify-upload *,
.propify-download * {
  box-sizing: border-box;
}

/* ======================================================================
 * CONTAINERS COMUNS
 * ====================================================================== */

.propify-upload,
.propify-download {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin: 18px 0;
}

/* Títulos gerais */
.propify-upload-title,
.propify-explorer-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

/* Pequeno texto secundário */
.propify-sub,
.propify-status-text {
  font-size: 13px;
  color: #666;
}

/* Botões “neutros” (além das .button do WP) – se quisermos usar */
.propify-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  background: #f8f8f8;
  color: #222;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.propify-btn:hover {
  background: #f0f0f0;
}

/* ======================================================================
 * UPLOAD SHORTCODE
 * ====================================================================== */

.propify-upload-header {
  margin-bottom: 10px;
}

/* Área Drag & Drop */
.propify-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #cfd6e0;
  border-radius: 12px;
  padding: 28px;
  background: #fbfdff;
  color: #4a5568;
  transition: .15s ease;
  cursor: pointer;
}
.propify-dropzone:hover {
  background: #f7fbff;
}

/* JS aplica classe "drag-over" (não is-dragover) */
.propify-dropzone.drag-over {
  border-color: #2271b1;
  background: #eef6ff;
  color: #1d5a8b;
}

.propify-dropzone-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.propify-dropzone-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.propify-dropzone-text {
  font-size: 13px;
  color: #4a5568;
}
.propify-dropzone-text .muted {
  color: #777;
  margin: 0 4px;
}

.propify-dropzone .propify-btn-browse {
  border: none;
  background: #2271b1;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease;
}
.propify-dropzone .propify-btn-browse:hover {
  background: #1d5a8b;
}

/* Switch "criar subpasta ao enviar" */
.propify-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 8px;
}
.propify-switch input[type="checkbox"] {
  margin: 0;
}

/* Fila de upload / mensagem vazia */
.propify-upload-queue {
  margin-top: 10px;
  font-size: 13px;
  min-height: 26px;
}
.propify-upload-empty {
  color: #777;
}

/* Resultados (lista de uploads) */
.propify-upload-results {
  margin-top: 12px;
  border-top: 1px dashed #e4e4e4;
  padding-top: 10px;
}
.propify-upload-results h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.propify-upload-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.propify-upload-results-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f1f1;
}
.propify-upload-results-list li:last-child {
  border-bottom: none;
}
.propify-upload-results-list .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.propify-upload-results-list .progress {
  width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Estados de sucesso/erro (JS adiciona .success/.failed) */
.propify-upload-results-list li.success .progress {
  color: #0b6a0b;
}
.propify-upload-results-list li.failed .progress {
  color: #b30000;
}

/* ======================================================================
 * DOWNLOAD SHORTCODE – “Explorer”
 * ====================================================================== */

.propify-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.propify-explorer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Ajuste nos botões pequenos padrão do WP dentro do explorer */
.propify-explorer-actions .button.button-small {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}

/* Breadcrumb + status */
.propify-explorer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

.propify-breadcrumb {
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.propify-status-text {
  text-align: right;
}

/* Corpo: árvore + grid */
.propify-explorer-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}

/* Coluna da árvore de pastas */
.propify-tree-wrap {
  border-right: 1px solid #f0f0f0;
  padding-right: 12px;
}
.propify-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.propify-tree-empty {
  font-size: 13px;
  color: #777;
}
.propify-tree li {
  margin-bottom: 4px;
}
.propify-download-folder {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.propify-download-folder:hover {
  background: #f3f7ff;
}

/* Grid principal de arquivos (usa .propify-entry criado via JS) */
.propify-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.propify-grid-empty,
.propify-empty {
  font-size: 13px;
  color: #777;
}

/* Item do explorer */
.propify-entry {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  transition: background .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.propify-entry:hover {
  background: #fff;
  border-color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* Coluna de ícone/miniatura */
.propify-entry .thumb,
.propify-entry .icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f0f3f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.propify-entry .thumb {
  background-size: cover;
  background-position: center;
}

/* Metadados */
.propify-entry .meta {
  flex: 1;
  min-width: 0;
}
.propify-entry .name {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 2px;
  word-break: break-all;
}
.propify-entry .muted {
  font-size: 11px;
  color: #777;
}

/* Ações (download + checkbox) */
.propify-entry .actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.propify-entry .propify-act-download {
  border-radius: 999px;
  border: 1px solid #dcdcdc;
  background: #fff;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.propify-entry .propify-act-download:hover {
  background: #f3f3f3;
}

/* Checkbox de seleção */
.propify-entry .propify-select {
  cursor: pointer;
}

/* Estado selecionado (quando JS marca via .propify-select) – estilo leve: borda azul */
.propify-entry-selected,
.propify-entry .propify-select:checked ~ .something {
  /* opcional se quiser estilizar via JS adicionando classe */
}

/* ======================================================================
 * RESPONSIVO
 * ====================================================================== */

@media (max-width: 800px) {
  .propify-explorer-body {
    grid-template-columns: 1fr;
  }
  .propify-tree-wrap {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding-right: 0;
    padding-bottom: 10px;
  }
}

@media (max-width: 640px) {
  .propify-explorer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .propify-explorer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .propify-download {
    padding: 12px;
  }
  .propify-upload {
    padding: 12px;
  }
  .propify-grid {
    grid-template-columns: 1fr 1fr;
  }
}
