/* Family Tree Styles - Based on Odoo module */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f5f5;
    font-family: Arial, sans-serif;
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#canvas {
    width: 100%;
    height: 100%;
}

/* D3 Tree Styles */
.node circle {
    fill: #69b3a2;
    stroke: #555;
    stroke-width: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.node circle:hover {
    fill: #4a9b8a;
    stroke: #333;
    stroke-width: 3px;
}

.node circle.male {
    fill: #6495ED;
}

.node circle.female {
    fill: #FF69B4;
}

.node text {
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-anchor: middle;
    fill: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.link {
    fill: none;
    stroke: #555;
    stroke-width: 1.5px;
    opacity: 0.6;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

/* Search Box */
.search-box {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.search-box input {
    width: 200px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
    border-color: #69b3a2;
    width: 250px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        left: 10px;
        top: 10px;
    }

    .search-box input {
        width: 150px;
    }

    .search-box input:focus {
        width: 180px;
    }

    .controls {
        bottom: 10px;
        right: 10px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
    }

    .node text {
        font-size: 10px;
    }
}

/* Loading state */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #666;
}

/* Highlight for search */
.node.highlighted circle {
    stroke: #ff6b6b;
    stroke-width: 4px;
    fill: #ffd93d;
}

.node.dimmed {
    opacity: 0.2;
}
