/* ==========================================================================
   Genealogic Pedigree - Combined CSS
   Snippets 1, 22, 46, 54
   ========================================================================== */

:root {
    --glp-primary: #D74709;
    --glp-dark: #111111;
}

/* ==========================================================================
   SNIPPET 1: [dog_pedigree] - Standard Pedigree Tree
   ========================================================================== */

/* --- CONTENEDOR MAESTRO --- */
.pedigree-master-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0;
}

/* --- CAJA DEL ARBOL (SCROLL/DRAG FIX MOVIL) --- */
.standard-pedigree-fullwidth {
    width: 100%;
    height: auto;
    min-height: 400px;
    background: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
    border: none;
    box-shadow: none;
    cursor: grab;
    padding-bottom: 40px;
}
.standard-pedigree-fullwidth:active { cursor: grabbing; }

/* Espacio interno que haremos Zoom y Drag */
.pedigree-tree-container {
    display: flex;
    padding: 40px 100px 150px 40px;
    width: max-content;
    min-width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    transform-origin: top left;
    transition: transform 0.3s ease;
}

/* --- BOTONES FLOTANTES --- */
.glp-floating-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    pointer-events: auto;
}

.glp-fab {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background-color: #fff;
    color: #8492a6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.fab-orange,
.fab-black,
.fab-white {
    background-color: #fff;
    color: #8492a6;
}
.fab-orange:hover,
.fab-black:hover,
.fab-white:hover {
    background-color: #f0f2f5;
    color: var(--glp-dark, #1a1a2e);
}

/* DNA button active = orange */
.fab-black.active {
    background-color: var(--glp-primary, #D74709);
    color: #fff;
}
.fab-black.active:hover {
    background-color: #c03f08;
    color: #fff;
}

.fab-gen-wrapper { position: relative; }
.fab-gen-menu {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-width: 44px;
    text-align: center;
}
.fab-menu-item {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #8492a6;
    cursor: pointer;
    transition: all 0.15s ease;
}
.fab-menu-item:hover {
    background: #f0f2f5;
    color: #1a1a2e;
}
.fab-menu-item.active {
    color: #fff;
    background: var(--glp-primary, #D74709);
}

/* --- ESTILOS COMUNES DE TARJETAS --- */
.pedigree-node::before, .pedigree-node::after,
.pedigree-children::before, .pedigree-children::after,
.node-content::before, .node-content::after { content: none; }

.node-content {
    background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 10px;
    display: flex; align-items: center; gap: 10px; width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); position: relative; z-index: 2;
    transition: transform 0.2s ease;
}
.node-content:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,0.08); z-index: 10; }
.node-content img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; background: #fff; }
.dog-info { display: flex; flex-direction: column; text-align: left; }
.dog-name { font-weight: bold; color: #333; text-decoration: none; font-size: 13px; line-height: 1.2; }
.dog-breed { font-size: 11px; color: #777; margin-top: 2px; }
.empty-node { background: #f9f9f9; color: #999; justify-content: center; }
.endogamia-tag { display: inline-block; color: #fff; border-radius: 10px; padding: 2px 6px; font-size: 10px; margin-top: 5px; font-weight: bold; width: max-content; }

/* =======================================
   LOGICA MAGICA DE LINEAS (HORIZONTAL)
   ======================================= */
.layout-horizontal { flex-direction: row; align-items: center; justify-content: flex-start; }

.layout-horizontal .pedigree-node {
    display: flex; flex-direction: row; align-items: center; position: relative;
    padding: 10px 0 10px 30px;
}

.layout-horizontal .pedigree-node::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: #ccc;
}
.layout-horizontal .pedigree-node:first-child::before { top: 50%; }
.layout-horizontal .pedigree-node:last-child::before { bottom: 50%; }
.layout-horizontal .pedigree-node:only-child::before { display: none; }

.layout-horizontal .pedigree-node::after {
    content: ""; position: absolute; left: 0; top: 50%; width: 30px; height: 2px; background: #ccc;
}

.layout-horizontal .root-node { padding-left: 0; margin-left: 0; }
.layout-horizontal .root-node::before, .layout-horizontal .root-node::after { display: none; }

.layout-horizontal .pedigree-children {
    display: flex; flex-direction: column; position: relative;
    margin-left: 30px;
    padding-left: 0;
}
.layout-horizontal .pedigree-children::before {
    content: ""; position: absolute; left: -30px; top: 50%; width: 30px; height: 2px; background: #ccc;
}

/* =======================================
   LOGICA MAGICA DE LINEAS (VERTICAL)
   ======================================= */
.layout-vertical { flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 20px !important; }

.layout-vertical .pedigree-node {
    display: flex; flex-direction: column; align-items: center; position: relative;
    padding: 30px 10px 0 10px; margin-left: 0;
}

.layout-vertical .pedigree-node::before {
    content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 2px; background: #ccc;
}
.layout-vertical .pedigree-node::after {
    content: ''; position: absolute; top: 0; left: 50%; width: 50%; height: 2px; background: #ccc;
}
.layout-vertical .pedigree-node:first-child::before { display: none; }
.layout-vertical .pedigree-node:last-child::after { display: none; }
.layout-vertical .pedigree-node:only-child::before, .layout-vertical .pedigree-node:only-child::after { display: none; }

.layout-vertical .node-content::before {
    content: ''; position: absolute; top: -30px; left: 50%; width: 2px; height: 30px; background: #ccc; transform: translateX(-50%); z-index: -1;
}

.layout-vertical .root-node { padding-top: 0; }
.layout-vertical .root-node::before, .layout-vertical .root-node::after { display: none; }
.layout-vertical .root-content::before { display: none; }

.layout-vertical .pedigree-children {
    display: flex; flex-direction: row; justify-content: center; position: relative;
    margin-top: 30px; margin-left: 0; padding-left: 0;
}
.layout-vertical .pedigree-children::before {
    content: ''; position: absolute; top: -30px; left: 50%; width: 2px; height: 30px; background: #ccc; transform: translateX(-50%);
}

.layout-vertical .node-content { flex-direction: column; text-align: center; width: 110px; padding: 10px 5px; gap: 5px;}
.layout-vertical .node-content img { width: 45px; height: 45px; margin-bottom: 2px;}
.layout-vertical .dog-info { align-items: center; text-align: center;}
.layout-vertical .dog-name { font-size: 11px; }
.layout-vertical .dog-breed { font-size: 9px; }

/* --- CONTROL DE GENERACIONES CSS --- */
#pedigree-tree[data-active-gen="3"] .gen-4, #pedigree-tree[data-active-gen="3"] .gen-5, #pedigree-tree[data-active-gen="3"] .gen-6, #pedigree-tree[data-active-gen="3"] .gen-7, #pedigree-tree[data-active-gen="3"] .gen-8, #pedigree-tree[data-active-gen="3"] .gen-9, #pedigree-tree[data-active-gen="3"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="4"] .gen-5, #pedigree-tree[data-active-gen="4"] .gen-6, #pedigree-tree[data-active-gen="4"] .gen-7, #pedigree-tree[data-active-gen="4"] .gen-8, #pedigree-tree[data-active-gen="4"] .gen-9, #pedigree-tree[data-active-gen="4"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="5"] .gen-6, #pedigree-tree[data-active-gen="5"] .gen-7, #pedigree-tree[data-active-gen="5"] .gen-8, #pedigree-tree[data-active-gen="5"] .gen-9, #pedigree-tree[data-active-gen="5"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="6"] .gen-7, #pedigree-tree[data-active-gen="6"] .gen-8, #pedigree-tree[data-active-gen="6"] .gen-9, #pedigree-tree[data-active-gen="6"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="7"] .gen-8, #pedigree-tree[data-active-gen="7"] .gen-9, #pedigree-tree[data-active-gen="7"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="8"] .gen-9, #pedigree-tree[data-active-gen="8"] .gen-10 { display: none !important; }
#pedigree-tree[data-active-gen="9"] .gen-10 { display: none !important; }

#pedigree-tree[data-active-gen="3"] .gen-3 > .pedigree-children,
#pedigree-tree[data-active-gen="4"] .gen-4 > .pedigree-children,
#pedigree-tree[data-active-gen="5"] .gen-5 > .pedigree-children,
#pedigree-tree[data-active-gen="6"] .gen-6 > .pedigree-children,
#pedigree-tree[data-active-gen="7"] .gen-7 > .pedigree-children,
#pedigree-tree[data-active-gen="8"] .gen-8 > .pedigree-children,
#pedigree-tree[data-active-gen="9"] .gen-9 > .pedigree-children,
#pedigree-tree[data-active-gen="10"] .gen-10 > .pedigree-children { display: none !important; }


/* ==========================================================================
   SNIPPET 22: Admin Pedigree Creator
   ========================================================================== */

#admin-dog-search-input:focus {
    outline: none;
    border: 1px solid #017DFA;
}

/* Admin search results (snippet 22 specific) */
.dog-search-result {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}
.dog-search-result img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}
.dog-search-result span {
    font-size: 12px;
    color: #666;
}

/* Admin Popup */
#parent-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#parent-popup .popup-content {
    background: #fff;
    padding: 50px;
    border-radius: 10px;
    width: 50%;
    position: relative;
}
#parent-popup .popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}

/* Admin tabs */
.tabs { display: flex; margin-bottom: 10px; }
.tab-btn {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
}
.tab-btn.active { background: #D74709; color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Admin form inputs */
#parent-popup form input[type="text"],
#parent-popup form input[type="date"],
#parent-popup form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}
#parent-popup form input[type="submit"] {
    padding: 15px;
    background-color: #D74709;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#parent-popup form input[type="submit"]:hover {
    background-color: #c7440c;
}

/* Admin tree styles */
.pedigree-root-centered { display: inline-block; }
.pedigree-node.lateral { margin-right: 30px; position: relative; }
.pedigree-node.lateral .node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}
.dog-photo-wrapper {
    position: relative;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    transition: background-color 0.3s ease;
}
.dog-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.dog-photo-wrapper:hover {
    background-color: #ccc;
}
.dog-photo-wrapper:hover img {
    opacity: 0;
}
.change-node {
    display: block;
    width: 18px;
    height: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    background: #ccc url('https://app.genealogic.io/wp-content/uploads/2025/02/cambiar.svg') no-repeat center center;
    background-size: contain;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dog-photo-wrapper:hover .change-node { opacity: 1; }
.node-title { font-size: 14px; text-align: center; }
.node-parents {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: space-evenly;
}
.parent-slot { flex: 1; }

.missing-parent {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 50%;
    cursor: pointer;
}
.missing-parent:hover {
    border-color: #aaa;
}
.add-parent {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: #ccc;
    line-height: 1;
    text-align: center;
}
.add-parent:hover {
    color: #999;
}

/* Gallery */
.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}
.gallery-item {
    position: relative;
    cursor: move;
}
.gallery-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}
.gallery-item .remove-gallery-item {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.add-gallery-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    cursor: pointer;
}
.add-gallery-item i {
    font-size: 24px;
    color: #ccc;
}
.loading-item {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    background-color: #f0f0f0;
    position: relative;
}
.loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 0;
    width: 100%;
    border-radius: 10px;
    background-color: #D74709;
}
.loading-text {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 14px;
    color: #fff;
}

.pedigree-root-centered {
    padding: 50px;
}

#pedigree-tree-container {
    overflow-x: hidden !important;
    height: auto !important;
    white-space: nowrap;
}


/* ==========================================================================
   SNIPPET 46: User Pedigree Editor
   ========================================================================== */

/* --- ESTILOS MODERNOS BUSCADOR (v2.5) --- */
#user-pedigree-search-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#user-pedigree-search-input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    color: #333;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#user-pedigree-search-input:focus {
    outline: none;
    border-color: #D74709;
    box-shadow: 0 0 0 3px rgba(215, 71, 9, 0.1);
}
#user-pedigree-search-results {
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 10px;
    box-sizing: border-box;
}
.user-pedigree-search-result {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}
.user-pedigree-search-result:last-child {
    border-bottom: none;
}
.user-pedigree-search-result:hover {
    background-color: #f7f7f7;
}
.user-pedigree-search-result img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}
.user-pedigree-search-result div {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    color: #222;
    font-weight: 600;
}
.user-pedigree-search-result span {
    font-size: 13px;
    color: #777;
    font-weight: 400;
}

/* --- ESTILOS MODERNOS POPUP & ARBOL (v2.7) --- */

/* Fuentes y Contenedor del Popup */
#user-parent-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#user-parent-popup .popup-content {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}
#user-parent-popup .popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-size: 28px;
    color: #aaa;
    line-height: 1;
    transition: color 0.2s ease;
}
#user-parent-popup .popup-close:hover {
    color: #333;
}
#user-parent-popup h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
    color: #222;
    font-weight: 700;
}

/* User Tabs */
#user-parent-popup .tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
}
#user-parent-popup .tab-btn {
    flex: 1;
    padding: 15px 10px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #777;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease;
    margin-bottom: -1px;
}
#user-parent-popup .tab-btn:not(.active) {
    color: #777 !important;
    background-color: transparent !important;
}
#user-parent-popup .tab-btn:not(.active):hover {
    color: #333 !important;
    background: transparent !important;
}
#user-parent-popup .tab-btn.active {
    border-bottom-color: #D74709;
    color: #D74709 !important;
    font-weight: 600;
}
#user-parent-popup .tab-btn.active:hover {
    color: #D74709 !important;
    background: transparent !important;
}

/* User form inputs */
#user-parent-popup form input[type="text"],
#user-parent-popup #user-parent-search-input,
#user-parent-popup form input[type="date"],
#user-parent-popup form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: #fdfdfd;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#user-parent-popup form input[type="text"]:focus,
#user-parent-popup #user-parent-search-input:focus,
#user-parent-popup form input[type="date"]:focus,
#user-parent-popup form select:focus {
    outline: none;
    border-color: #D74709;
    box-shadow: 0 0 0 3px rgba(215, 71, 9, 0.1);
}

/* User submit button */
#user-parent-popup form input[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #D74709;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#user-parent-popup form input[type="submit"]:hover {
    background-color: #c7440c;
}

/* Secondary buttons */
.pedigree-secondary-button {
    flex: 1;
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.pedigree-secondary-button:hover {
    background: #e0e0e0;
    color: #222;
}

/* User tree overrides */
#user-parent-popup ~ .pedigree-node.lateral .dog-photo-wrapper {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Reglas de hover solo para .pedigree-admin */
.pedigree-admin .dog-photo-wrapper {
    cursor: pointer;
}
.pedigree-admin .dog-photo-wrapper:hover {
    background-color: #ccc;
}
.pedigree-admin .dog-photo-wrapper:hover img {
    opacity: 0;
}
.pedigree-admin .dog-photo-wrapper:hover .change-node {
    opacity: 1;
}

/* User missing parent hover */
#user-pedigree-tree-container .missing-parent:hover {
    border-color: #D74709;
}
#user-pedigree-tree-container .missing-parent:hover .add-parent {
    color: #D74709;
}

/* User gallery overrides */
#user-parent-popup .add-gallery-item:hover {
    border-color: #D74709;
}
#user-parent-popup .add-gallery-item:hover i {
    color: #D74709;
}

#user-pedigree-tree-container {
    overflow-x: hidden !important;
    height: auto !important;
    white-space: nowrap;
}


/* ==========================================================================
   SNIPPET 54: Litter Pedigree Preview
   ========================================================================== */

/* --- HERO SECCION --- */
.litter-hero {
    position: relative; width: 100%; background: #ffffff; overflow: hidden;
    padding: 60px 20px; font-family: 'Plus Jakarta Sans', sans-serif; text-align: center;
    border-bottom: none;
}
#litter-cruce-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.4; pointer-events: none;
}
.litter-hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }

.litter-hero-breed {
    display: inline-flex; align-items: center; background: var(--glp-primary); color: #fff;
    padding: 6px 16px; border-radius: 20px; font-weight: 600; font-size: 15px; margin-bottom: 30px;
}
.litter-hero-breed img {
    width: 22px; height: 22px; border-radius: 50%; margin-right: 8px; object-fit: cover; border: 1px solid #fff;
}

/* PADRES */
.litter-parents-showcase { display: flex; justify-content: center; align-items: center; gap: 30px; margin-bottom: 40px; }
.parent-profile { text-align: center; width: 200px; }
.parent-profile img {
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1); margin-bottom: 15px;
}
.parent-profile h3 { margin: 0 0 10px 0; font-size: 20px; color: var(--glp-dark); font-weight: 700; }
.x-divider {
    font-size: 30px; font-weight: 900; color: var(--glp-primary); background: #fff; width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.health-badges { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.health-badge { font-size: 12px; color: #555; background: #f0f0f0; padding: 4px 10px; border-radius: 12px; width: fit-content;}

/* TIMELINE */
.litter-timeline { display: flex; justify-content: space-between; max-width: 600px; margin: 0 auto 40px auto; position: relative; }
.litter-timeline::before { content: ''; position: absolute; top: 15px; left: 10%; right: 10%; height: 3px; background: #eee; z-index: -1; }
.timeline-step { text-align: center; flex: 1; position: relative; color: #aaa; }
.timeline-step .dot {
    width: 30px; height: 30px; background: #eee; border-radius: 50%; margin: 0 auto 10px auto;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; transition: 0.3s;
}
.timeline-step.active { color: var(--glp-dark); font-weight: bold; }
.timeline-step.active .dot { background: var(--glp-primary); box-shadow: 0 0 0 5px rgba(215, 71, 9, 0.2); }
.timeline-step p { margin: 0; font-size: 13px; }
.timeline-step small { font-size: 11px; display: block; font-weight: normal;}

/* BOTON E INTERES */
.btn-litter-interest {
    background: var(--glp-dark); color: #fff; border: none; padding: 15px 35px; border-radius: 30px; font-size: 18px; font-weight: bold; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-litter-interest:hover { background: var(--glp-primary); transform: translateY(-2px); }

/* Litter pedigree fullwidth */
.litter-pedigree-fullwidth {
    width: 100%; height: auto; min-height: 400px; background: transparent; font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border-radius: 0; border: none; box-shadow: none; cursor: grab; padding-bottom: 40px;
}
.litter-pedigree-fullwidth:active { cursor: grabbing; }

/* MODAL CRM */
.litter-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 999999; backdrop-filter: blur(5px); }
.litter-modal { background: #fff; width: 90%; max-width: 550px; border-radius: 12px; position: relative; font-family: 'Plus Jakarta Sans', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.litter-modal .popup-header { padding: 25px 30px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.litter-modal h3 { margin: 0; font-size: 20px; font-weight:700; color:#333; }
.litter-modal .close-btn { font-size: 28px; cursor: pointer; color: #aaa; line-height:1; transition: 0.2s;}
.litter-modal .close-btn:hover { color: var(--glp-primary); }
.litter-modal .popup-body { padding: 30px; max-height: 75vh; overflow-y: auto; }

.litter-form-group { margin-bottom: 20px; text-align: left; }
.litter-form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #444;}
.litter-form-group input, .litter-form-group textarea, .litter-form-group select { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit; font-size: 15px; outline:none; transition:0.2s; background:#fff;}
.litter-form-group input:focus, .litter-form-group textarea:focus, .litter-form-group select:focus { border-color: var(--glp-primary); }
.litter-form-group textarea { resize: vertical; min-height: 100px; }

.litter-modal .popup-footer { padding: 20px 30px; border-top: 1px solid #eee; background: #fdfdfd; text-align: right; border-radius: 0 0 12px 12px;}
.btn-submit-crm { background: #000; color: #fff; border: none; padding: 14px 30px; border-radius: 100px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; width: 100%; font-family: inherit;}
.btn-submit-crm:hover { background: #333; transform: translateY(-2px); }

.form-feedback { margin-top: 15px; font-weight: 500; font-size: 14px; display: none; text-align: center; padding: 12px; border-radius: 8px; }
.form-feedback.success { background: #e0f8e0; border: 1px solid #a0d0a0; color: #27ae60; }
.form-feedback.error { background: #f8e0e0; border: 1px solid #d0a0a0; color: #c0392b; }

.inquiry-wa-btn { background-color: #25D366; color: #fff; padding: 14px 30px; border-radius: 100px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; margin-top: 25px; transition: 0.2s; box-shadow: 0 4px 10px rgba(37,211,102,0.3);}
.inquiry-wa-btn:hover { background-color: #128C7E; color: #fff; transform: translateY(-2px);}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .glp-floating-controls {
        bottom: 20px;
        left: 15px;
        gap: 10px;
        flex-direction: row;
        align-items: center;
    }
    .glp-floating-controls { gap: 6px; }
    .glp-fab { width: 36px; height: 36px; font-size: 13px; border-radius: 10px; }
    .fab-gen-menu { min-width: 38px; bottom: 44px; }
    .fab-menu-item { padding: 7px 10px; font-size: 12px; }

    /* Litter responsive */
    .litter-parents-showcase { flex-direction: column; gap: 15px; }
    .x-divider { width: 40px; height: 40px; font-size: 20px; }
    .litter-timeline::before { display: none; }
    .litter-timeline { flex-direction: column; gap: 20px; align-items: flex-start; margin-left: 20px; border-left: 2px solid #eee; padding-left: 20px;}
    .timeline-step { text-align: left; display: flex; align-items: center; gap: 15px; width: 100%;}
    .timeline-step .dot { margin: 0; flex-shrink: 0; }
}

/* ==========================================================================
   COI Health Panel
   ========================================================================== */

/* --- Side Panel --- */
#coi-health-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
    z-index: 999998;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-y: auto;
}

#coi-health-panel.is-open {
    right: 0;
}

/* --- Panel Header --- */
.coi-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.coi-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coi-panel-header h3 i {
    color: var(--glp-primary, #D74709);
    font-size: 20px;
}

#coi-panel-collapse {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e8ecf1;
    background: #fff;
    color: #8492a6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

#coi-panel-collapse:hover {
    background: #f8f9fb;
    color: var(--glp-primary, #D74709);
    border-color: var(--glp-primary, #D74709);
}

/* --- Panel Body --- */
.coi-panel-body {
    padding: 24px;
    flex: 1;
}

.coi-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- COI Value Display --- */
.coi-value-display {
    text-align: center;
    padding: 20px 0;
}

.coi-percentage {
    display: block;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.coi-percentage.level-green { color: #27ae60; }
.coi-percentage.level-orange { color: #e67e22; }
.coi-percentage.level-red { color: #e74c3c; }

.coi-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #8492a6;
    letter-spacing: 0.02em;
}

/* --- COI Bar --- */
.coi-bar-wrapper {
    padding: 0 8px;
}

.coi-bar {
    position: relative;
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: visible;
    background: #f0f0f0;
}

.coi-bar-segment {
    height: 100%;
    transition: opacity 0.3s ease;
}

.coi-bar-segment.coi-green {
    width: 25%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 7px 0 0 7px;
}

.coi-bar-segment.coi-orange {
    width: 25%;
    background: linear-gradient(90deg, #f1c40f, #e67e22);
}

.coi-bar-segment.coi-red {
    width: 50%;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    border-radius: 0 7px 7px 0;
}

/* --- COI Indicator (needle) --- */
.coi-bar-indicator {
    position: absolute;
    top: -6px;
    left: 0;
    width: 4px;
    height: 26px;
    border-radius: 2px;
    background: #1a1a2e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
    transform: translateX(-50%);
}

.coi-bar-indicator.level-green { background: #1a5c34; }
.coi-bar-indicator.level-orange { background: #8a5a10; }
.coi-bar-indicator.level-red { background: #8b1a1a; }

/* --- Bar Labels --- */
.coi-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
}

/* --- Interpretation --- */
.coi-interpretation {
    padding: 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.4s ease;
    background: #f8f9fb;
    color: #666;
}

.coi-interpretation i {
    margin-top: 2px;
    font-size: 16px;
    flex-shrink: 0;
}

.coi-interpretation.level-green {
    background: #eafaf1;
    color: #1a7a42;
}

.coi-interpretation.level-orange {
    background: #fef9e7;
    color: #9a6c0a;
}

.coi-interpretation.level-red {
    background: #fdedec;
    color: #a93226;
}

/* --- Gen Info --- */
.coi-gen-info {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

/* --- Collapsed Toggle Strip --- */
#coi-panel-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 44px;
    padding: 12px 0;
    border: none;
    border-radius: 12px 0 0 12px;
    background: #fff;
    color: #8492a6;
    font-size: 16px;
    cursor: pointer;
    z-index: 999997;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.10);
    transition: all 0.25s ease;
}

#coi-panel-toggle:hover {
    background: #f0f2f5;
    color: var(--glp-primary, #D74709);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.14);
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    #coi-health-panel {
        width: 100%;
        right: -100%;
    }

    #coi-panel-toggle {
        width: 38px;
        font-size: 14px;
        padding: 10px 0;
    }

    .coi-percentage {
        font-size: 44px;
    }
}
