/* ======== Variables ========= */
:root{
    --main-color: #12458f;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
     --font-family-general: "Ancizar sans";
}

/* ========  Menú  ========= */
.db-menu-title {
    color: #0f172a;
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.db-menu-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.db-node circle {
    stroke-width: 1.5px;
    transition: fill 0.3s ease;
}

.db-node text {
    font-size: 12px;
    font-family: inherit;
    fill: #475569;
}

.db-tree-radio:hover {
    fill: #f1f5f9 !important;
}

.db-link {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}

/*  ======= Info Manager ======== */
.db-info-service {
    display: flex;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.db-info-service:not(.db-hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.db-info-service.db-mode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(4px); 
    cursor: pointer;
    text-align: center;
}

.db-info-service.db-mode-help,
.db-info-service.db-mode-glossary {
    background-color: transparent;
    width: auto;
    height: auto;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.db-info-card {
    display: flex;
    flex-direction: column;
    width: 70%;
    max-width: 800px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    cursor: default;
}

.db-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: #0f172a;
    padding: 1.25em 1.5em;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1em;
}

.db-info-header strong {
    font-weight: 600;
}

.db-info-close {
    background: transparent;
    border: none;
    font-size: 1.5em;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.db-info-close:hover {
    color: #ef4444;
}

.db-info-body {
    overflow-y: auto;
    word-wrap: break-word;
    padding: 1.5em;
    font-size: 0.95em;
    color: #334155;
    line-height: 1.6;
    text-align: left;
}

/* --- MENÚ (Árbol D3)  --- */
#db-menu-tree-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    overflow: hidden; 
}
#db-menu-tree-container svg {
    background: transparent;
}
#db-menu-tree-container svg text {
    fill: #334155; 
}

#db-menu-tree-container svg path {
    stroke: var(--main-color);
    stroke-width: 1.5px;
    fill: none;
    opacity: 0.3;
}

.db-svg-content {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
}

.db-hidden {
    display: none !important;
}

/* Custom styling for the top buttons injected in HTML */
.rap.active {
    background: rgba(18, 69, 143, 0.1);
    color: var(--main-color);
    border-color: var(--main-color);
}

.rap {
    padding: 0.7em 2em;
    border-radius: 20px;
    margin-right: 10px;
    background: white;
    border: 1px solid var(--border-color);
    color: #475569;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 1.2em;
    font-family: var(--);
}

.rap:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.rap-container {
    justify-content: center;
    display: flex;
    align-items: center;
    margin-bottom: 2em;
}

.rap-text {
    font-size: 3.1em;
    font-weight: 600;
    color: #334155;
    margin-left: 1em;
}