/* ── redactor-form ── referencia de diseño del admin ── */

.rf-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 28px;
  align-items: start;
}

/* ── Foto ── */
.rf-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 20px;
}

.rf-photo__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* img-drop circular */
.img-drop {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px dashed #d1d5db;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  background: #f3f4f1;
}
.dark .img-drop              { border-color: #2C3040; background: #1C1F27; }
.img-drop--over              { border-color: #0099BB; background: #f0fafc; }
.img-drop--loaded            { border-style: solid; border-color: transparent; }

.img-drop__preview           { width: 100%; height: 100%; object-fit: cover; display: block; }

.img-drop__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  color: #8F9BAD;
  font-size: 0.75rem;
  pointer-events: none;
}
.img-drop__placeholder svg { color: #d1d5db; }
.img-drop__link            { color: #0099BB; text-decoration: underline; cursor: pointer; pointer-events: all; }

/* ── Campos ── */
.rf-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rf-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rf-label {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5A6478;
}
.dark .rf-label { color: #8A92A8; }

.rf-required { color: #D94343; }
.rf-error    { font-size: 0.72rem; color: #D94343; margin: 0; }

.rf-section-label {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0099BB;
  padding-bottom: 4px;
  border-bottom: 1px solid #DDE2DC;
  margin-top: 4px;
}
.dark .rf-section-label { color: #00C4E0; border-color: #2C3040; }

/* Inputs */
.rf-fields input[type="text"],
.rf-fields input[type="email"],
.rf-fields input[type="url"],
.rf-fields textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #DDE2DC;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: #FFFFFF;
  color: #1A1F2E;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.rf-fields input:focus,
.rf-fields textarea:focus {
  border-color: #0099BB;
  box-shadow: 0 0 0 3px rgba(0, 153, 187, 0.12);
}
.dark .rf-fields input,
.dark .rf-fields textarea {
  background: #1C1F27;
  border-color: #2C3040;
  color: #E8EAF0;
}
.rf-fields textarea { min-height: 90px; resize: vertical; }

/* Grid redes 2 col */
.rf-networks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

/* Bottom: toggle + acciones */
.rf-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #DDE2DC;
  flex-wrap: wrap;
}
.dark .rf-bottom { border-color: #2C3040; }

/* Toggle */
.rf-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  color: #1A1F2E;
  user-select: none;
}
.dark .rf-toggle { color: #E8EAF0; }

.rf-toggle input[type="checkbox"] {
  width: 36px; height: 20px;
  appearance: none;
  background: #DDE2DC;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.rf-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.rf-toggle input[type="checkbox"]:checked        { background: #0099BB; }
.rf-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }

/* Acciones */
.rf-actions { display: flex; gap: 8px; }

.rf-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.rf-btn--primary { background: #0099BB; color: #fff; }
.rf-btn--primary:hover { opacity: 0.88; }
.rf-btn--ghost {
  background: transparent;
  color: #5A6478;
  border: 1px solid #DDE2DC;
}
.rf-btn--ghost:hover { background: #E9ECE7; color: #1A1F2E; }
.dark .rf-btn--ghost { border-color: #2C3040; color: #8A92A8; }
.dark .rf-btn--ghost:hover { background: #242830; color: #E8EAF0; }

/* Meta */
.rf-meta {
  font-size: 0.69rem;
  color: #8F9BAD;
  display: flex;
  gap: 12px;
}
.rf-meta code {
  background: #E9ECE7;
  padding: 1px 6px;
  border-radius: 4px;
  color: #5A6478;
}
.dark .rf-meta code { background: #242830; color: #8A92A8; }

/* Errores globales */
.rf-errors {
  margin: 12px 28px 0;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #7f1d1d;
  font-size: 0.84rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .rf-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 24px;
  }

  .rf-photo {
    position: static;
    flex-direction: column;
    align-items: center;
  }

  /* En mobile la foto es más pequeña */
  .img-drop {
    width: 120px;
    height: 120px;
  }

  .rf-networks {
    grid-template-columns: 1fr;
  }

  /* Toggle y botones se apilan verticalmente */
  .rf-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .rf-actions {
    flex-direction: column;
    width: 100%;
  }

  .rf-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
}