/**
 * Estilos aislados de Transparencia Notarial con utilidades de Tailwind CSS.
 */

:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --outline-variant: #e2e8f0;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info-bg: #e0f2fe;
  --info-text: #0369a1;
}

.ntg-transparency-wrapper {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 20px 0;
  width: 100%;
  color: var(--text-main);
}

.ntg-session-banner {
  margin-bottom: 16px;
}

.ntg-badge-session {
  background-color: var(--info-bg);
  color: var(--info-text);
  border: 1px solid #bae6fd;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ntg-table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--outline-variant);
  border-radius: 10px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  background: var(--surface);
}

.ntg-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.ntg-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline-variant);
}

.ntg-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline-variant);
  vertical-align: middle;
}

.ntg-table tr:last-child td {
  border-bottom: none;
}

.ntg-table tr:hover td {
  background-color: #f8fafc;
}

.ntg-doc-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.3;
}

.ntg-doc-period {
  font-size: 12px;
  color: #2563eb;
  font-weight: 500;
  margin-top: 3px;
}

.ntg-doc-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.ntg-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.ntg-badge-category {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.ntg-badge-local {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.ntg-badge-drive {
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.ntg-hash-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.ntg-btn-copy-hash {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.ntg-btn-copy-hash:hover {
  opacity: 1;
}

.ntg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

.ntg-btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
}

.ntg-btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff !important;
}

.ntg-btn-lock {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.ntg-btn-lock:hover {
  background-color: #fde68a;
  color: #92400e;
}

.ntg-btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.ntg-btn-secondary:hover {
  background-color: #e2e8f0;
}

.ntg-btn-icon {
  width: 16px;
  height: 16px;
}

.ntg-icon {
  width: 18px;
  height: 18px;
}

.ntg-no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 24px !important;
  font-style: italic;
}

/* Modal UI */
body.ntg-modal-open {
  overflow: hidden !important;
  touch-action: none;
}

.ntg-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ntg-modal-card {
  background: var(--surface);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  padding: 24px;
  position: relative;
  animation: ntgModalFade 0.2s ease-out;
  box-sizing: border-box;
  margin: auto;
}

@keyframes ntgModalFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ntg-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.ntg-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.ntg-modal-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.ntg-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.ntg-modal-subtitle {
  font-size: 13px;
  color: #2563eb;
  margin-top: 4px;
  font-weight: 500;
}

.ntg-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.ntg-form-field label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}

.ntg-form-field input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--outline-variant);
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.ntg-form-field input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.ntg-field-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ntg-feedback {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.ntg-feedback-success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.ntg-feedback-error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ntg-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ntg-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ntgSpin 0.6s linear infinite;
}

@keyframes ntgSpin {
  to { transform: rotate(360deg); }
}

/* Variantes de Botón Individual */
.ntg-single-btn-container {
  display: inline-block;
  margin: 6px 0;
}

.ntg-single-btn-container.ntg-btn-full-wrap {
  display: block;
  width: 100%;
}

.ntg-btn-outline {
  background-color: transparent !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
}

.ntg-btn-outline:hover {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}

.ntg-btn-lg {
  padding: 12px 24px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
}

.ntg-btn-sm {
  padding: 5px 10px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
}

.ntg-btn-full {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Barra de Descarga en Lote (ZIP) */
.ntg-batch-bar {
  background: #1e3a8a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
  animation: ntgModalFade 0.2s ease-out;
}

.ntg-batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.ntg-batch-icon {
  font-size: 18px;
}

.ntg-batch-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ntg-batch-actions .ntg-btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #60a5fa !important;
}

.ntg-batch-actions .ntg-btn-primary:hover {
  background: #1d4ed8 !important;
}

.ntg-batch-actions .ntg-btn-secondary {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.ntg-batch-actions .ntg-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.ntg-th-check input[type="checkbox"],
.ntg-td-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e3a8a;
  cursor: pointer;
  vertical-align: middle;
}

/* Modal y Casilla de Política de Privacidad */
.ntg-modal-privacy-card {
  max-width: 680px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.ntg-privacy-content-scroll {
  overflow-y: auto;
  max-height: 52vh;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
  text-align: left;
}

.ntg-privacy-content-scroll h3 {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 15px;
  color: #1e3a8a;
}

.ntg-privacy-content-scroll p {
  margin: 8px 0;
}

.ntg-privacy-content-scroll ul {
  padding-left: 20px;
  margin: 8px 0;
}

.ntg-privacy-field {
  margin-top: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.ntg-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.4;
}

.ntg-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #1e3a8a;
  cursor: pointer;
}

.ntg-open-privacy-modal {
  color: #1e3a8a;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.ntg-open-privacy-modal:hover {
  color: #2563eb;
}

.ntg-privacy-page-wrapper {
  background: #ffffff;
  padding: 28px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  line-height: 1.65;
  color: #1e293b;
}

/* Alerta y Formulario de Justificación por Bloqueo Geográfico */
.ntg-geo-banner-warning {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
  text-align: left;
}

.ntg-form-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: #1e293b;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

.ntg-form-field textarea:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}


