/* ════════════════════════════════════════
   UI EXTRAS — elementos nuevos de la v2
   Cubre: búsqueda, comentarios, toasts,
   notificaciones, convocatorias, menú
   contextual, modales de artista/edición,
   perfil website, thumbnails overlay.
   me invitó una amiga
   ════════════════════════════════════════ */

/* ── Topbar: botón icono (campana) ── */
.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink3);
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.topbar-icon-btn:hover { background: var(--paper2); color: var(--ink); }
.topbar-icon-btn svg   { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }

.notif-badge {
  position: absolute; top: 1px; right: 1px;
  width: 16px; height: 16px;
  background: var(--crimson); color: #fff;
  font-size: 9px; font-weight: 600;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--paper);
}

/* ── Panel de notificaciones ── */
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 10, 13, 0.12);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.notif-panel.open { display: block; }

.notif-panel-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.notif-item:hover   { background: var(--paper2); }
.notif-item.unread  { background: var(--crimson-pale); }
.notif-item:last-child { border-bottom: none; }

.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--crimson); flex-shrink: 0; margin-top: 5px;
}
.notif-item:not(.unread) .notif-dot { background: var(--border2); }

.notif-text p    { font-size: 0.82rem; color: var(--ink2); line-height: 1.4; }
.notif-text span { font-size: 0.72rem; color: var(--ink3); }
.notif-empty { padding: 1.5rem; text-align: center; font-size: 0.82rem; color: var(--ink3); }

/* ── Búsqueda — dropdown ── */
.topbar-search { position: relative; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 10, 13, 0.12);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.search-dropdown.open { display: block; }

.search-group-label {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink3);
}

.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--paper2); }

.search-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: #fff; flex-shrink: 0;
}
.search-icon-box {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--paper3); display: flex; align-items: center;
  justify-content: center; font-size: 14px; color: var(--ink3); flex-shrink: 0;
}

.search-result-name { font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.search-result-sub  { font-size: 0.75rem; color: var(--ink3); }
.search-empty       { padding: 1rem; font-size: 0.85rem; color: var(--ink3); text-align: center; }

/* ── Comentarios en cards ── */
.comments-section {
  border-top: 1px solid var(--border);
  background: var(--paper2);
}

.comments-list   { padding: 0.75rem 1.25rem 0; }

.comment-item {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 0.6rem;
}

.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500; color: #fff; flex-shrink: 0;
}

.comment-bubble {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 0.4rem 0.75rem;
  font-size: 0.82rem; line-height: 1.5; max-width: calc(100% - 38px);
}

.comment-username {
  font-weight: 500; color: var(--ink);
  margin-right: 6px; font-size: 0.8rem;
}
.comment-text { color: var(--ink2); }
.no-comments  { font-size: 0.8rem; color: var(--ink3); font-style: italic; margin-bottom: 0.75rem; }

.comment-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0.6rem 1.25rem 0.75rem;
}
.comment-input-wrap {
  flex: 1; display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--paper); overflow: hidden;
  transition: border-color 0.2s;
}
.comment-input-wrap:focus-within { border-color: var(--crimson); }

.comment-input {
  flex: 1; border: none; outline: none; padding: 0.45rem 0.75rem;
  font-size: 0.85rem; font-family: 'Jost', sans-serif;
  background: none; color: var(--ink);
}

.comment-send {
  background: none; border: none; padding: 0.35rem 0.6rem;
  cursor: pointer; color: var(--ink3); display: flex; align-items: center;
  transition: color 0.15s;
}
.comment-send:hover { color: var(--crimson); }
.comment-send svg   { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ── Menú contextual de tarjeta ── */
.card-dropdown {
  position: absolute; top: 100%; right: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(26, 10, 13, 0.1);
  z-index: 50;
  display: none; min-width: 150px; overflow: hidden;
}
.card-dropdown.open { display: block; }

.card-dropdown button {
  width: 100%; padding: 0.55rem 1rem;
  background: none; border: none; border-bottom: 1px solid var(--border);
  font-size: 0.82rem; color: var(--ink2);
  cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Jost', sans-serif;
  transition: background 0.1s;
}
.card-dropdown button:last-child { border-bottom: none; }
.card-dropdown button:hover      { background: var(--paper2); }
.card-dropdown button.danger:hover { background: var(--crimson-pale); color: var(--crimson); }
.card-dropdown button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ── Card action active (comentario abierto) ── */
.card-action.active { color: var(--crimson); background: var(--crimson-light); }

/* ── Profile website link ── */
.profile-website {
  font-size: 0.8rem; color: var(--crimson);
  text-decoration: none; display: flex; align-items: center; gap: 4px;
  margin-top: 3px;
}
.profile-website svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.profile-website:hover { text-decoration: underline; }

/* ── Profile following stat ── */
#stat-followers, #stat-following { font-family: 'Playfair Display', serif; }

/* ── Thumbnail overlay (botón eliminar en hover) ── */
.project-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(26, 10, 13, 0); display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 2;
}
.project-card-grid:hover .project-thumb-overlay { background: rgba(26, 10, 13, 0.25); }

.thumb-delete-btn {
  background: rgba(255,255,255,0.9); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity 0.2s;
  color: var(--crimson);
}
.thumb-delete-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.project-card-grid:hover .thumb-delete-btn { opacity: 1; }

/* ── Empty state genérico ── */
.empty-projects {
  text-align: center; padding: 2.5rem; color: var(--ink3);
  grid-column: 1 / -1;
  border: 2px dashed var(--border); border-radius: 10px;
}
.empty-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.3; }
.empty-projects p { font-size: 0.875rem; line-height: 1.6; }

/* ── Section header card ── */
.section-header-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 600; margin-bottom: 0.75rem;
  color: var(--ink);
}

/* ── Explore grid: badge de disciplina en thumbnail ── */
.project-thumb-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(26, 10, 13, 0.55);
  color: #fff; font-size: 0.65rem;
  padding: 2px 8px; border-radius: 10px;
  letter-spacing: 0.04em; z-index: 2;
  pointer-events: none;
}

/* ── Explore: empty state ── */
.explore-empty {
  grid-column: 1 / -1; text-align: center; padding: 2.5rem;
  color: var(--ink3); font-size: 0.875rem;
}

/* ── Convocatorias ── */
.call-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s;
}
.call-card:hover { box-shadow: 0 4px 20px rgba(26, 10, 13, 0.07); }

.call-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.call-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 600; color: var(--ink);
}

.call-badge {
  font-size: 0.72rem; padding: 3px 12px; border-radius: 20px;
  background: var(--gold-light); color: #8a6a1a;
  font-weight: 500; white-space: nowrap;
}
.call-badge.applied { background: #d4f0d4; color: #2a7a2a; }

.call-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 0.75rem;
}
.call-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--ink3);
}
.call-meta-item svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0;
}

.call-desc {
  font-size: 0.875rem; color: var(--ink2); line-height: 1.6;
  margin-bottom: 1rem;
}

.call-footer {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  border-top: 1px solid var(--border); padding-top: 0.75rem;
}

.call-apply-btn.applied {
  background: #2a7a2a; cursor: default;
}
.call-apply-btn:disabled { opacity: 0.85; }

/* ── Modal de perfil de artista ── */
.artist-modal { max-width: 640px; }
.artist-modal-content { /* contenido inyectado por JS */ }

.artist-modal-header  { position: relative; }
.artist-modal-close   { position: absolute; top: 1rem; right: 1rem; z-index: 5; }

.artist-modal-cover {
  height: 100px;
  background: linear-gradient(135deg, var(--crimson-deep) 0%, var(--crimson) 60%, var(--crimson2) 100%);
  border-radius: 24px 24px 0 0;
  position: relative;
}
.artist-modal-cover::after {
  content: '';
  position: absolute; bottom: -30px; right: 40px;
  width: 100px; height: 100px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 50%;
}

.artist-modal-info-row {
  display: flex; align-items: flex-end; gap: 1rem;
  padding: 0 1.5rem; margin-top: -28px; margin-bottom: 0;
}

.artist-modal-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500; color: #fff; flex-shrink: 0;
  outline: 2px solid var(--gold);
}

.artist-modal-meta    { flex: 1; padding-bottom: 0.75rem; }
.artist-modal-name    { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.artist-modal-role    { font-size: 0.82rem; color: var(--ink3); margin-top: 2px; }
.artist-modal-web     { font-size: 0.78rem; color: var(--crimson); text-decoration: none; display: block; margin-top: 3px; }
.artist-modal-web:hover { text-decoration: underline; }

.artist-modal-stats {
  display: flex; gap: 2rem; padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.artist-modal-bio     { padding: 1rem 1.5rem; }
.artist-modal-projects { padding: 0 1.5rem 1.5rem; }

/* ── Toasts ── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem; font-family: 'Jost', sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  pointer-events: all;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }

.toast-success { background: #1a4a1a; }
.toast-error   { background: var(--crimson-deep); }
.toast-warn    { background: #5a4a00; }
.toast-info    { background: var(--ink); }

.toast-icon { flex-shrink: 0; }
.toast-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

.toast-msg   { flex: 1; line-height: 1.4; }
.toast-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 18px; cursor: pointer; padding: 0; line-height: 1;
  flex-shrink: 0;
}
.toast-close:hover { color: #fff; }

/* ── Responsive extras ── */
@media (max-width: 900px) {
  .notif-panel { right: -60px; }
}
@media (max-width: 640px) {
  #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { max-width: 100%; }
  .artist-modal { max-height: 95vh; }
}
