/* --- Detalles de la transacción (compartido) --- */
.details { margin-top: 16px; }
.details-body { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 900px){ .details-body { grid-template-columns: 1fr; } }
.details-col { background:#f7f7f7; border:1px solid #e0e0e0; border-radius:8px; padding:10px; min-width: 0; }
.details-col-header { display:flex; justify-content: space-between; align-items:center; margin-bottom: 6px; }
.details-col h3 { margin: 0; font-size: 14px; color:#444; }
.details pre { max-height: 260px; overflow: auto; background:#fff; border:1px solid #eee; padding:8px; border-radius:6px; max-width: 100%; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.pill { font-size: 12px; padding:2px 6px; background:#eee; border-radius: 10px; }
.small { font-size: 12px; }
.copy-btn { border: 1px solid #ccc; background: #fff; padding: 4px 8px; border-radius: 6px; cursor: pointer; }

/* --- Resultados de búsqueda (tabla) --- */
.results-card-header { display:flex; align-items:center; justify-content: space-between; gap: 12px; }
.results-card-header h3 { margin: 0; font-size: 16px; }
.results-count { font-size: 12px; color: #666; }
.results-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.results-table th, .results-table td { text-align: left; padding: 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.results-table thead th { font-weight: 600; color: #444; background: #fafafa; }
.results-table tbody tr:hover { background: #fcfcfc; }
.source-cell a { color: #1a73e8; text-decoration: none; }
.source-cell a:hover { text-decoration: underline; }
.snippet { max-height: 140px; overflow: auto; background:#fff; border:1px solid #eee; padding:8px; border-radius:6px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
/* styles.css */
:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e5e7eb;
    --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 24px rgba(0,0,0,0.06);
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Chat UI helpers --- */
.chat-container { scrollbar-gutter: stable; }
.chat-bubble { box-shadow: 0 1px 1px rgba(0,0,0,0.05); }

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
header h1 {
    margin: 0;
    padding: 16px 20px;
    font-size: 20px;
    font-weight: 600;
}

h1, h2, h3 { color: var(--text); }

form {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background-color: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.form-div {
    margin: 0 10px; /* Espacio entre divs */
    width: 90%;
    display: ruby;
    align-items: center;
  }

label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 600;
}

input[type="text"],
textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width calculations */
}

/* Estilo para los radio buttons */
input[type="radio"] {
    height: 16px; /* Ajusta automáticamente la altura */
    margin-right: 5px; /* Espacio entre los radio buttons y las etiquetas */
}

button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.12s ease;
}
button:hover, input[type="submit"]:hover {
    box-shadow: var(--shadow);
}
button.btn-primary, input[type="submit"].btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
button.btn-primary:hover, input[type="submit"].btn-primary:hover { background: var(--primary-600); }
button.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
button.btn-danger:hover { filter: brightness(0.95); }

/* Respuesta */
h2 {
    margin-top: 20px;
    color: #333;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

/* JSON en formato crudo */
pre {
    background-color: #eee;
    padding: 10px;
    border-radius: 5px;
    overflow-x: scroll;
}

.container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    align-items: start;
    min-height: calc(100vh - 60px);
}

/* Estilo para la respuesta en formato JSON */
#respuesta_json {
    font-family: "Courier New", monospace;
}

/* Estilos para el contenido principal */
.content {
    width: 100%;
    padding: 24px;
    max-width: 1200px;
}

.content h1 {
    color: #333;
}

/* Estilos para el panel lateral (sidebar) */
.sidebar {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.sidebar h1 {
    font-size: 24px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
}
.sidebar a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}
.section-title { margin: 0 0 12px 0; font-size: 18px; font-weight: 700; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: #f8fafc; color: #111827; }
.table-striped tr:nth-child(even) { background: #fafafa; }

/* Utility */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }

/* Responsive */
@media (max-width: 980px){
    .container { grid-template-columns: 1fr; }
    .sidebar { position: relative; top: 0; height: auto; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.08); }
}

/* API Endpoint Info Component */
.api-endpoint-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.api-endpoint-info .endpoint-label {
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-endpoint-info .endpoint-method {
    display: inline-block;
    padding: 2px 8px;
    background: #0284c7;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.api-endpoint-info .endpoint-method.get { background: #16a34a; }
.api-endpoint-info .endpoint-method.post { background: #0284c7; }
.api-endpoint-info .endpoint-method.delete { background: #dc2626; }
.api-endpoint-info .endpoint-method.put { background: #ea580c; }

.api-endpoint-info .endpoint-url {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #e0f2fe;
    color: #0c4a6e;
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.api-endpoint-info .endpoint-url code {
    flex: 1;
    background: none;
    padding: 0;
}

.api-endpoint-info .copy-endpoint-btn {
    background: #0284c7;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    transition: background 0.2s;
}

.api-endpoint-info .copy-endpoint-btn:hover {
    background: #0369a1;
}

.api-endpoint-info .copy-endpoint-btn:active {
    transform: scale(0.98);
}

.api-endpoint-info .endpoint-description {
    color: #475569;
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.5;
}
