/**
 * HeritagePress Person Tabs Styles
 */

/* Container */
.hp-person-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Person Header */
.hp-person-header-container {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hp-person-photo {
    flex: 0 0 150px;
    margin-right: 20px;
}

.hp-person-photo img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hp-person-placeholder-photo {
    width: 150px;
    height: 150px;
    background-color: #e0e0e0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-person-placeholder-photo .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #999;
}

.hp-person-info {
    flex: 1;
}

.hp-person-name {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.hp-person-suffix {
    font-size: 18px;
    color: #666;
    margin-left: 5px;
}

.hp-person-surname-link {
    margin: 5px 0 10px;
    font-size: 14px;
}

.hp-person-surname-link a {
    color: #0073aa;
    text-decoration: none;
}

.hp-person-surname-link a:hover {
    text-decoration: underline;
}

.hp-person-vital-info p {
    margin: 5px 0;
    color: #555;
}

/* Tabs Navigation */
.hp-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
}

.hp-tabs-nav li {
    margin: 0;
    padding: 0;
}

.hp-tabs-nav li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
}

.hp-tabs-nav li.active a {
    background-color: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    color: #333;
}

.hp-tabs-nav li a:hover {
    background-color: #f5f5f5;
    color: #333;
}

.hp-tabs-nav li a .dashicons {
    margin-right: 5px;
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* Tab Content */
.hp-tab-content {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.hp-tab-section {
    margin-bottom: 30px;
}

.hp-tab-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 22px;
    color: #333;
}

/* Facts */
.hp-facts-list {
    margin-top: 15px;
}

.hp-fact-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.hp-fact-type {
    flex: 0 0 120px;
    font-weight: 600;
    color: #555;
}

.hp-fact-details {
    flex: 1;
}

.hp-fact-date-place {
    margin-bottom: 5px;
}

.hp-fact-description {
    color: #666;
    font-style: italic;
}

/* Family Cards */
.hp-family-card {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.hp-family-header {
    margin-bottom: 15px;
}

.hp-family-title {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.hp-marriage-info {
    color: #666;
    font-size: 14px;
}

.hp-spouse, .hp-children {
    margin-top: 15px;
}

.hp-spouse h4, .hp-children h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #555;
}

.hp-children-list {
    margin: 0;
    padding: 0 0 0 20px;
}

.hp-child-item {
    margin-bottom: 5px;
}

.hp-child-birth-year {
    color: #777;
    font-size: 13px;
    margin-left: 5px;
}

/* Parents Section */
.hp-parents-info {
    margin-bottom: 15px;
}

.hp-parent {
    margin-bottom: 5px;
}

.hp-parent-label {
    font-weight: 600;
    margin-right: 5px;
}

/* Person Links */
.hp-person-link {
    color: #0073aa;
    text-decoration: none;
}

.hp-person-link:hover {
    text-decoration: underline;
}

.hp-surname-link {
    font-size: 12px;
    color: #0073aa;
    text-decoration: none;
    margin-left: 5px;
}

.hp-surname-link:hover {
    text-decoration: underline;
}

/* No Data Message */
.hp-no-data {
    color: #888;
    font-style: italic;
}

/* Ancestors Tab */
.hp-ancestors-controls, .hp-descendants-controls {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.hp-generations-select {
    margin: 0 10px;
}

.hp-tree-container {
    margin-top: 20px;
    position: relative;
}

.hp-tree-level {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.hp-tree-node {
    margin: 0 10px;
    min-width: 150px;
}

.hp-tree-person-box {
    padding: 10px;
    background-color: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 5px;
    text-align: center;
}

.hp-tree-unknown .hp-tree-person-box {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.hp-tree-person-dates {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.hp-tree-message {
    margin-top: 20px;
    padding: 10px;
    background-color: #fffde7;
    border: 1px solid #fff9c4;
    border-radius: 5px;
    font-size: 13px;
    color: #856404;
}

/* Descendants Tab */
.hp-descendants-summary {
    margin-bottom: 20px;
}

.hp-tree-family {
    margin-top: 20px;
    position: relative;
}

.hp-tree-spouse {
    margin-bottom: 10px;
    text-align: center;
}

/* Relationships Tab */
.hp-siblings-list {
    margin: 0;
    padding: 0 0 0 20px;
}

.hp-sibling-item {
    margin-bottom: 5px;
}

.hp-sibling-birth-year {
    color: #777;
    font-size: 13px;
    margin-left: 5px;
}

.hp-relationship-family {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.hp-relationship-family:last-child {
    border-bottom: none;
}

.hp-spouse-name {
    margin: 0 0 10px 0;
    font-size: 18px;
}

/* Timeline Tab */
.hp-timeline-container {
    margin-top: 20px;
}

.hp-timeline-scale {
    position: relative;
    padding-left: 100px;
}

.hp-timeline-decade {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-left: 2px solid #ddd;
    padding-left: 20px;
}

.hp-decade-marker {
    position: absolute;
    left: -100px;
    top: 0;
    font-weight: 600;
    color: #555;
    width: 80px;
    text-align: right;
}

.hp-timeline-event {
    position: relative;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #eee;
}

.hp-timeline-event:before {
    content: '';
    position: absolute;
    left: -22px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: #0073aa;
    border-radius: 50%;
    border: 2px solid #fff;
}

.hp-timeline-event-date {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.hp-timeline-event-type {
    color: #0073aa;
    font-weight: 500;
    margin-bottom: 3px;
}

.hp-timeline-event-place {
    color: #555;
    margin-bottom: 3px;
}

.hp-timeline-event-description {
    color: #666;
    font-style: italic;
}

.hp-timeline-event-age {
    color: #777;
    font-size: 13px;
    margin-top: 5px;
}

.hp-timeline-controls {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hp-person-header-container {
        flex-direction: column;
    }
    
    .hp-person-photo {
        margin-right: 0;
        margin-bottom: 20px;
        align-self: center;
    }
    
    .hp-tabs-nav {
        flex-wrap: wrap;
    }
    
    .hp-tabs-nav li {
        flex: 1 0 auto;
        text-align: center;
    }
    
    .hp-tabs-nav li a {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .hp-tabs-nav li a .dashicons {
        margin-right: 0;
        display: block;
        margin: 0 auto 5px;
    }
    
    .hp-fact-item {
        flex-direction: column;
    }
    
    .hp-fact-type {
        margin-bottom: 5px;
    }
    
    .hp-timeline-scale {
        padding-left: 60px;
    }
    
    .hp-decade-marker {
        left: -60px;
        width: 50px;
    }
}