/* Linealogy Custom Styles */

:root {
    --primary-color: #2470dc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
}

/* Navigation enhancements */
.navbar-brand {
    font-size: 1.5rem;
}

/* Card enhancements */
.card {
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
}

/* Only add hover effects to clickable cards */
.card.cursor-pointer {
    transition: box-shadow 0.2s;
}

.card.cursor-pointer:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

/* Person cards */
.person-card {
    cursor: pointer;
    transition: all 0.2s;
}

.person-card:hover {
    transform: translateY(-2px);
}

.person-male {
    border-left: 4px solid #3498db;
}

.person-female {
    border-left: 4px solid #e74c3c;
}

.person-unknown {
    border-left: 4px solid #95a5a6;
}

/* Family tree visualization */
.tree-container {
    overflow: auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
}

/* Event type badges */
.event-birth { background-color: #28a745; }
.event-death { background-color: #6c757d; }
.event-marriage { background-color: #e83e8c; }
.event-divorce { background-color: #dc3545; }
.event-occupation { background-color: #17a2b8; }
.event-residence { background-color: #ffc107; color: #212529; }

/* Relationship lines for charts */
.relationship-line {
    stroke: #666;
    stroke-width: 2;
    fill: none;
}

.relationship-line.marriage {
    stroke: #e83e8c;
}

.relationship-line.parent-child {
    stroke: #28a745;
}

/* Search and filter */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* HTMX loading states */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        padding-left: 60px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    footer,
    .no-print {
        display: none !important;
    }
    
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}