/* ════════════════════════════════════════
   MODAL — publicar proyecto
   ════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 13, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--paper);
  border-radius: 24px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Cabecera */
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.modal-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink3);
  transition: background 0.15s;
}
.modal-close:hover { background: var(--paper2); }
.modal-close svg   { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Cuerpo */
.modal-body { padding: 1.5rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Upload de imagen */
.img-upload {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.img-upload:hover { border-color: var(--crimson); background: var(--crimson-pale); }
.img-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-upload-icon  { font-size: 2rem; color: var(--ink3); margin-bottom: 8px; }
.img-upload-text  { font-size: 0.85rem; color: var(--ink3); }

.img-preview {
  width: 100%;
  border-radius: 12px;
  max-height: 220px;
  object-fit: cover;
  margin-top: 0.75rem;
  display: none;
}

/* Input de etiquetas */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 42px;
  cursor: text;
  transition: border-color 0.2s;
}
.tags-input:focus-within { border-color: var(--crimson); }

.tag-pill {
  background: var(--crimson-light);
  color: var(--crimson);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.tag-pill button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.tags-input-field {
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: 'Jost', sans-serif;
  color: var(--ink);
  min-width: 80px;
  background: none;
}

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