/* Timeline2 - Ancestry-style LifeStory */
.lp-timeline2 {
    background: #f8f9fa;
    padding: 20px 0;
}

/* Family Cards Section */
.lp-family-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lp-family-cards {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.lp-family-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    min-width: 200px;
}

.lp-family-avatar {
    width: 40px;
    height: 40px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.lp-family-info a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.lp-family-relation {
    font-size: 12px;
    color: #666;
}

.lp-family-extra {
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

/* Timeline Events */
.lp-timeline2-events {
    position: relative;
    padding-left: 100px;
}

.lp-timeline2-events::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dee2e6;
}

.lp-timeline2-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.lp-timeline2-item:first-child {
    margin-top: 30px;
}

.lp-decade-marker {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 40px 0 30px 0;
    padding-left: 100px;
}

.lp-decade-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #dee2e6, transparent);
}

.lp-decade-label {
    font-size: 18px;
    font-weight: 700;
    color: #007cba;
    padding: 8px 20px;
    background: white;
    border: 2px solid #007cba;
    border-radius: 20px;
    white-space: nowrap;
}

.lp-filter-btn {
    padding: 8px 16px;
    background: white !important;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: #333 !important;
    text-decoration: none !important;
}

.lp-event-filters .lp-filter-btn {
    color: #333 !important;
    background: white !important;
}

.lp-filter-btn:hover {
    background: #f8f9fa !important;
    border-color: #007cba;
    color: #007cba !important;
}

.lp-event-filters .lp-filter-btn:hover {
    color: #007cba !important;
    background: #f8f9fa !important;
}

.lp-filter-btn.active {
    background: #007cba !important;
    color: white !important;
    border-color: #007cba;
}

.lp-event-filters .lp-filter-btn.active {
    background: #007cba !important;
    color: white !important;
}

.lp-pdf-btn {
    padding: 10px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.lp-pdf-btn:hover {
    background: #005a87;
}

.lp-timeline2-date {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
}

.lp-date-badge {
    background: #5c5c5c;
    color: white;
    padding: 8px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.lp-date-day {
    font-size: 10px;
    line-height: 1.2;
}

.lp-date-year {
    font-size: 14px;
    font-weight: 700;
}

.lp-date-age {
    font-size: 9px;
    margin-top: 2px;
    opacity: 0.9;
}

.lp-timeline2-content {
    flex: 1;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.lp-timeline2-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1a1e21;
}

.lp-event-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.lp-event-place {
    font-size: 14px;
    color: #007cba;
}

.lp-event-chatgpt {
    margin-top: 10px;
    padding: 12px 15px;
    background: #e8f5e9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lp-chatgpt-link {
    color: #2e7d32;
    text-decoration: none;
    font-size: 13px;
    flex: 1;
}

.lp-chatgpt-link:hover {
    text-decoration: underline;
}

.lp-save-answer-btn {
    padding: 8px 16px;
    background: #fff;
    color: #2e7d32;
    border: 1px solid #2e7d32;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.lp-save-answer-btn:hover {
    background: #2e7d32;
    color: white;
}

.lp-save-answer-btn.saved:not(a) {
    background: #f5f5f5;
    border-color: #999;
    color: #999;
    cursor: not-allowed;
}

.lp-save-answer-btn.saved:not(a):hover {
    background: #f5f5f5;
    color: #999;
}

.lp-save-answer-btn:disabled {
    background: #f5f5f5;
    border-color: #999;
    color: #999;
    cursor: not-allowed;
}

a.lp-save-answer-btn {
    display: inline-block;
    text-decoration: none;
    background: #fff;
    color: #2e7d32;
    border: 1px solid #2e7d32;
}

a.lp-save-answer-btn:hover {
    background: #2e7d32;
    color: white;
}

.lp-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.lp-modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.lp-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.lp-modal-close:hover {
    color: #333;
}

.lp-modal-question {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

#lp-answer-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    margin-bottom: 15px;
}

.lp-save-btn {
    background: #2e7d32;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.lp-save-btn:hover {
    background: #1b5e20;
}

.lp-save-message {
    margin-top: 10px;
    font-size: 14px;
}

#timeline2-map {
    width: 100%;
    height: 400px;
    background: #f0f0f0;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .lp-timeline2-events {
        padding-left: 70px;
    }
    
    .lp-timeline2-events::before {
        left: 40px;
    }
    
    .lp-timeline2-date {
        width: 60px;
    }
    
    .lp-date-badge {
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    
    .lp-family-cards {
        flex-direction: column;
    }
}
