/* style.css - Master stylesheet - Refined for proper centering */

:root {
    --primary-blue: #0066cc;
    --primary-red: #d32f2f;
    --light-bg: #f9f9f9;
}

* { box-sizing: border-box; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Main container - this prevents full-width stretching */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
table { 
		width: 100%; 
		border-collapse: collapse; 
}
th, td { 
		padding: 10px; 
		border: 1px solid #ddd; 
		text-align: left; 
}
/* Headings */
h1, h2 {
    text-align: center;
    margin-bottom: 16px;
}

/* Links */
a { color: var(--primary-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Animal nodes */
.animal-node {
    margin: 16px 0;
    padding: 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.animal-node.root-male   { max-width: 1400px; border: 4px solid #0066cc; }
.animal-node.root-female { max-width: 1400px; border: 4px solid #d32f2f; }

.animal-node.sire-side { border-left: 6px solid #0066cc; border-bottom: 3px solid #0066cc; }
.animal-node.dam-side  { border-right: 6px solid #d32f2f; border-bottom: 3px solid #d32f2f; }

.node-name { font-weight: bold; font-size: 1.15em; }
.node-details { font-size: 0.95em; color: #555; }

/* Thumbnails */
.node-thumb {
    display: block;
    margin: 12px auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    max-width: 100%;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#lightbox img {
    max-width: 95%;
    max-height: 95%;
    border: 8px solid white;
    border-radius: 8px;
}
#lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    cursor: pointer;
}

/* Responsive tree */
.tree { margin: 24px 0; }

@media (min-width: 1024px) {
    .tree {
        display: flex;
        gap: 40px;
        justify-content: space-between;
    }
    .sire-branch, .dam-branch { flex: 1; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .node-thumb { max-width: 180px; }
}

/* Forms & buttons */
input, select, textarea, button {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: var(--primary-blue);
    color: white;
    font-weight: bold;
    cursor: pointer;
}
button:hover { background: #0055aa; }
/* Emergency max-width fix */
body > * {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.animal-node,
.info-box {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
/* Force the tree and main content to center properly */
.tree,
.content {
    max-width: 1400px;
    margin: 24px auto;
}
        .lookup-box {
            max-width: 520px;
            margin: 80px auto;
            padding: 40px 30px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            text-align: center;
        }
        .lookup-box input {
            font-size: 1.5rem;
            padding: 16px;
            text-align: center;
            width: 100%;
        }
img {
	display:block;
	margin-left:auto;
	margin-right:auto;
	border:2px solid black;
	border-radius:4px;
}
