/* 1001 Pro — Fase C features: favoritos, notas, fuzzy search */

/* Card overlays — star + note badge */
.dashboard-card { position: relative; }

.df-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
  opacity: 0.6;
  transition: opacity .15s ease;
}
.dashboard-card:hover .df-card-actions { opacity: 1; }

.df-fav-btn,
.df-note-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--app-border, #E5E7EB);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--app-muted, #6B7280);
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  padding: 0;
  font-family: inherit;
}
.df-fav-btn:hover,
.df-note-btn:hover {
  transform: scale(1.1);
  background: #fff;
}
.df-fav-btn[aria-pressed="true"] {
  background: var(--app-highlight, #FFCC00);
  color: var(--app-ink, #2A2118);
  border-color: #D9AE00;
}
.df-note-btn.has-note {
  background: var(--app-primary-l, #B8E6CC);
  color: var(--app-primary-d, #006B33);
  border-color: var(--app-primary, #009B4D);
}

/* Search highlight */
.dashboard-card mark {
  background: var(--app-highlight, #FFCC00);
  color: var(--app-ink, #2A2118);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 500;
}

/* Sidebar "Mis recursos" section */
.df-sidebar-section {
  padding: 18px 12px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--app-muted, #6B7280);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-nav-button.df-resource {
  /* extend existing nav-button style */
}
.dashboard-nav-button.df-resource .nav-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Onest', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  background-image: none !important;
  color: #fff;
}
.dashboard-nav-button[data-resource="favorites"] .nav-thumb {
  background: var(--app-highlight, #FFCC00);
  color: var(--app-ink, #2A2118);
}
.dashboard-nav-button[data-resource="notes"] .nav-thumb {
  background: var(--app-primary, #009B4D);
}

.df-count-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--app-bg, #fff);
  color: var(--app-muted, #6B7280);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--app-border, #E5E7EB);
}

/* Notes modal */
.df-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.df-modal-backdrop[data-open="true"] {
  display: flex;
  animation: df-fade-in .15s ease;
}
@keyframes df-fade-in { from { opacity: 0; } to { opacity: 1; } }

.df-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: df-slide-up .2s ease;
}
@keyframes df-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.df-modal-head {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--app-border, #E5E7EB);
}
.df-modal-head h3 {
  font-family: 'Onest', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--app-ink, #2A2118);
  margin: 0 0 4px;
  line-height: 1.3;
}
.df-modal-head small {
  color: var(--app-muted, #6B7280);
  font-size: 0.8125rem;
}

.df-modal-body {
  padding: 16px 24px;
  flex: 1;
  overflow-y: auto;
}
.df-modal textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border: 1px solid var(--app-border, #E5E7EB);
  border-radius: 8px;
  font-family: 'Onest', sans-serif;
  font-size: 0.95rem;
  color: var(--app-ink, #2A2118);
  resize: vertical;
  background: var(--app-surface-3, #F8F8FB);
}
.df-modal textarea:focus {
  outline: none;
  border-color: var(--app-primary, #009B4D);
  box-shadow: 0 0 0 3px rgba(0, 155, 77, .15);
  background: #fff;
}

.df-modal-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--app-border, #E5E7EB);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--app-surface-3, #F8F8FB);
}
.df-modal-status {
  font-size: 0.8125rem;
  color: var(--app-muted, #6B7280);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.df-modal-status.saved { color: var(--app-primary-d, #006B33); }
.df-modal-status.saving { color: var(--app-muted, #6B7280); }
.df-modal-actions { display: flex; gap: 8px; }

.df-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Onest', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease;
}
.df-btn-ghost {
  background: transparent;
  color: var(--app-ink-2, #5C4E3D);
  border-color: var(--app-border, #E5E7EB);
}
.df-btn-ghost:hover { background: var(--app-surface-3, #F8F8FB); }
.df-btn-danger {
  background: transparent;
  color: #DC2626;
  border-color: #FCA5A5;
}
.df-btn-danger:hover { background: #FEF2F2; }

/* Empty states for "Mis favoritos" / "Mis notas" filtered views */
.df-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--app-muted, #6B7280);
}
.df-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.df-empty p { max-width: 360px; margin: 0 auto; }

/* Responsive */
@media (max-width: 480px) {
  .df-card-actions { opacity: 1; top: 8px; right: 8px; }
  .df-fav-btn, .df-note-btn { width: 28px; height: 28px; font-size: 0.85rem; }
  .df-modal { border-radius: 12px; }
  .df-modal-head, .df-modal-body, .df-modal-foot { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 768px) {
  .df-modal { max-width: 100%; }
}
