/**
 * Parroquias DB — Correcciones CSS
 */

/* ════════════════════════════════════════
   BOTÓN "ENVIAR CORRECCIÓN"
   ════════════════════════════════════════ */
.pdb-corr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--pdb-borde, #e0d9cc);
  color: var(--pdb-texto-sub, #6b6b6b);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.pdb-corr-btn:hover {
  border-color: #c9a84c;
  color: #1a3a2a;
  background: rgba(201,168,76,0.08);
}
.pdb-corr-btn svg {
  flex-shrink: 0;
  opacity: 0.65;
}
.pdb-corr-btn:hover svg {
  opacity: 1;
}

/* Versión compacta para vista detalle */
.pdb-corr-btn-compact {
  font-size: 11px;
  padding: 4px 10px;
  gap: 5px;
}

/* ════════════════════════════════════════
   BARRA CON BOTÓN (en card footer y detalle)
   ════════════════════════════════════════ */
.pdb-corr-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 1.5rem 0.75rem;
}

.pdb-det-corr-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 1rem;
}

/* ════════════════════════════════════════
   OVERLAY
   ════════════════════════════════════════ */
.pdb-corr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: pdb-corr-fade 0.18s ease;
}
@keyframes pdb-corr-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.pdb-corr-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  animation: pdb-corr-up 0.22s ease;
  overflow: hidden;
}
@keyframes pdb-corr-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.pdb-corr-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.pdb-corr-header-icon {
  width: 40px;
  height: 40px;
  background: #f0ebe0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.pdb-corr-header h2 {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #1a3a2a;
  margin: 0 0 2px;
  line-height: 1.2;
}
.pdb-corr-header p {
  font-size: 12px;
  color: #888;
  margin: 0;
}
.pdb-corr-close {
  margin-left: auto;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
  flex-shrink: 0;
}
.pdb-corr-close:hover { background: #f5f5f5; color: #333; }

/* Body */
.pdb-corr-body {
  overflow-y: auto;
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Parroquia tag */
.pdb-corr-parroquia-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0ebe0;
  border: 1.5px solid #e0d9cc;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1a3a2a;
}
.pdb-corr-tag-icon { font-size: 1rem; }

/* Campos */
.pdb-corr-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}
.pdb-corr-req { color: #dc3545; }
.pdb-corr-opt { font-weight: 400; color: #aaa; font-size: 11px; }

.pdb-corr-field input[type="text"],
.pdb-corr-field input[type="email"],
.pdb-corr-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #333;
  background: #fafafa;
  outline: none;
  transition: all .2s;
  font-family: inherit;
  resize: vertical;
}
.pdb-corr-field input:focus,
.pdb-corr-field textarea:focus {
  border-color: #1a3a2a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,58,42,0.08);
}
.pdb-corr-field input::placeholder,
.pdb-corr-field textarea::placeholder { color: #bbb; }

/* Tipos chips */
.pdb-corr-tipos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pdb-corr-tipo-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pdb-corr-tipo-chip input[type="radio"] {
  display: none;
}
.pdb-corr-tipo-chip span {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  font-size: 12.5px;
  color: #555;
  background: #fafafa;
  transition: all .2s;
  cursor: pointer;
  user-select: none;
}
.pdb-corr-tipo-chip:hover span {
  border-color: #1a3a2a;
  color: #1a3a2a;
}
.pdb-corr-tipo-chip input:checked + span {
  background: #1a3a2a;
  border-color: #1a3a2a;
  color: #c9a84c;
  font-weight: 700;
}

/* 2 columnas */
.pdb-corr-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .pdb-corr-2col { grid-template-columns: 1fr; }
}

/* Mensajes */
.pdb-corr-error {
  background: #fff3f3;
  border: 1px solid #f5c2c7;
  color: #842029;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}
.pdb-corr-success {
  background: #f0fff4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pdb-corr-success-icon {
  width: 28px;
  height: 28px;
  background: #22c55e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pdb-corr-success strong {
  display: block;
  font-size: 13.5px;
  color: #166534;
  margin-bottom: 2px;
}
.pdb-corr-success p {
  font-size: 12.5px;
  color: #4b7a5a;
  margin: 0;
}

/* Footer */
.pdb-corr-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.pdb-corr-submit {
  background: #c9a84c;
  color: #1a3a2a;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.pdb-corr-submit:hover { background: #e8d48b; transform: translateY(-1px); }
.pdb-corr-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.pdb-corr-submit.loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #1a3a2a;
  border-top-color: transparent;
  border-radius: 50%;
  animation: pdb-spin .6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes pdb-spin { to { transform: rotate(360deg); } }

.pdb-corr-cancelar {
  background: none;
  border: 1.5px solid #e0e0e0;
  color: #666;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.pdb-corr-cancelar:hover { border-color: #bbb; color: #333; background: #f8f8f8; }

/* ════════════════════════════════════════
   ADMIN — CORRECCIONES
   ════════════════════════════════════════ */
.pdb-corr-admin-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pdb-corr-filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #e0e0e0;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: #fff;
  transition: all .2s;
}
.pdb-corr-filtro:hover { border-color: #1a3a2a; color: #1a3a2a; }
.pdb-corr-filtro.active { background: #1a3a2a; border-color: #1a3a2a; color: #c9a84c; font-weight: 700; }
.pdb-corr-badge {
  background: rgba(0,0,0,0.1);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.pdb-corr-filtro.active .pdb-corr-badge { background: rgba(201,168,76,0.25); }
.pdb-corr-filtro.pendiente.active { background: #fef3c7; border-color: #fbbf24; color: #92400e; }
.pdb-corr-filtro.revisada.active  { background: #dbeafe; border-color: #60a5fa; color: #1e3a8a; }
.pdb-corr-filtro.resuelta.active  { background: #dcfce7; border-color: #86efac; color: #166534; }

.pdb-corr-table .pdb-corr-desc {
  max-width: 300px;
  font-size: 12.5px;
  color: #444;
  line-height: 1.5;
}

.pdb-corr-estado {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}
.pdb-corr-estado-pendiente { background: #fef3c7; color: #92400e; }
.pdb-corr-estado-revisada  { background: #dbeafe; color: #1e3a8a; }
.pdb-corr-estado-resuelta  { background: #dcfce7; color: #166534; }
