@import url('../alliance_fonts/stylesheet.css');

:root {
    --micah-grey: hsl(0, 0%, 25%);
}

/* Reset and Base Styles */
body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    font-family: 'Alliance No.1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f4f6;
    overflow: hidden;
    position: fixed;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2001;
    font-family: 'Alliance No.2', Arial, sans-serif;
    font-size: 14px;
}

.navbar a {
    text-decoration: none;
    color: #404040;
    transition: all 0.5s;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    display: inline-block;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a:hover {
    background: #404040;
    border-color: #404040;
    color: #fff;
}

/* Mobile Warning Styles */
.mobile-warning {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    background: white;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    z-index: 2000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-warning h2 {
    font-weight: bold;
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #000000;
}

.mobile-warning p {
    font-weight: 300;
    margin: 0;
    font-size: 14px;
    color: #475569;
}

.desktop-content {
    display: block;
}

@media only screen and (max-width: 768px) {
    .desktop-content {
        display: none;
    }
    .mobile-warning {
        display: block;
    }
}

/* Tree Container */
.tree-container {
    position: absolute;
    background: transparent;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.3s ease;
}

/* Person Box Styles */
.person-box {
    position: absolute;
    width: 180px;
    background: white;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    z-index: 1;
}

.person-box.focused {
/*    border: 3px solid #2563eb;*/
    border: 3px solid #f56038;
    background-color: #fbd5cb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
    z-index: 2;
}

.person-box h3 {
    font-weight: bold;
    margin: 0;
    font-size: 16px;
    color: var(--micah-grey);  /* Added micah-grey for names */
}

.person-box h3 + p {
    margin-top: 5px;
}

.person-box p {
    font-weight: 300;
    margin: 0;
    font-size: 14px;
    color: var(--micah-grey);  /* Added micah-grey for dates */
}

/* SVG Connection Lines */
svg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.family-line {
    fill: none;
    stroke: #666;
    stroke-width: 2;
}

/* Nuclear Family Highlighting */
.person-box.nuclear-family {
    background-color: #f2e4ec;
    border-color: #8f3b76;
}

.person-box.nuclear-family.spouse {
    border-style: dashed;
}

.person-box.nuclear-family.child {
    border-style: solid;
}

.person-box.nuclear-family.parent {
    background-color: #c3e2e3 !important;
    border-color: #2e9598 !important;
}

/* Help Banner */
.help-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dbeafe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 8px;
    z-index: 1000;
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-controls input[type="range"] {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 8px;
    height: 150px;
    padding: 0 5px;
}

.zoom-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #94a3b8;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.zoom-btn:hover {
    background: #f1f5f9;
}

/* Search Container Styles */
.search-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 250px;
}

#searchInput {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#searchInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.3);
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f0f7ff;
}

/* Scrollbar Styling for Search Suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Info Controls */
.info-controls {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.info-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    z-index: 2000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    position: relative;
    margin-bottom: 20px;
}

.close-button {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: white;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    color: #64748b;
}

.close-button:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.info-modal h2 {
    font-size: 20px;
    font-weight: bold;
    color: #334155;
    margin: 0 0 20px 0;
}

.info-modal h3 {
    font-size: 16px;
    font-weight: bold;
    color: #334155;
    margin: 15px 0 10px 0;
}

.info-modal h4 {
    font-size: 16px;
    font-weight: bold;
    color: #334155;
    margin: 15px 0 10px 0;
}

.info-modal p {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin: 0 0 10px 0;
}

.info-modal ul {
    list-style-type: none;
    margin: 10px 0;
    padding: 0;
}

.info-modal li {
    font-size: 14px;
    color: #475569;
    padding: 5px 0 5px 20px;
    position: relative;
}

.info-modal li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #475569;
}

/*basic details*/

.basic-details-box {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: white;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    padding: 15px;
    width: 300px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Alliance No.1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.basic-details-content {
    max-height: 200px;
    overflow-y: auto;
}

.basic-details-content p {
    margin: 0;
    padding: 5px 0;
    font-size: 14px;
    color: var(--micah-grey);
    line-height: 1.4;
}

.detail-line {
/*    border-bottom: 1px solid #e2e8f0;*/
/*    padding-bottom: 8px !important;
    margin-bottom: 8px !important;*/
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
}

.detail-line:last-child {
/*    border-bottom: none;*/
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.basic-details-content::-webkit-scrollbar {
    width: 8px;
}

.basic-details-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.basic-details-content::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.basic-details-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.js-loading {
    visibility: hidden;
}

.js-loading.hide-fouc {
    visibility: visible;
}

/* Transitions for smooth appearance */
html, body {
    transition: opacity 0.2s ease;
}
