.hp-individual {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    background-color: var(--lp-background-color, #f8f9fa) !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
    font-family: var(--lp-font-family, inherit) !important;
    font-size: var(--lp-font-size, 14px) !important;
    color: var(--lp-text-color, inherit) !important;
}

.breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: var(--lp-font-size, 14px);
    color: #6c757d;
}

.breadcrumbs a {
    color: var(--lp-link-color, #007cba);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #495057;
    font-weight: 500;
}

/* Ancestry.com-style header */
.hp-ancestry-header {
    background: #5c5c5c;
    color: white;
    padding: 30px 60px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ancestry-photo {
    flex-shrink: 0;
}

.ancestry-photo img {
    width: 120px;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.ancestry-photo .photo-placeholder {
    width: 120px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.ancestry-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ancestry-name {
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: white;
    line-height: 1.2;
    font-family: var(--lp-font-family, inherit);
}

.ancestry-birth,
.ancestry-death {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.ancestry-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.8);
    min-width: 50px;
}

.ancestry-details {
    font-size: 16px;
    font-weight: 400;
    color: white;
    line-height: 1.4;
}

.section-container {
    background: white;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.section-title {
    background: white;
    margin: 0;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e1e5e9;
}

.hp-table {
    background-color: #fff;
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    table-layout: fixed;
    font-size: var(--lp-font-size, 14px);
}

.hp-labelcol { width: 150px; }

.hp-fieldname {
    background-color: #fafbfc;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 14px 20px;
    vertical-align: top;
    font-weight: 600;
    font-size: var(--lp-font-size, 13px);
    color: #495057;
}

.hp-data {
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 14px 20px;
    vertical-align: top;
    font-size: var(--lp-font-size, 14px);
    line-height: 1.6;
    color: #2c3e50;
}

.hp-table tr:last-child .hp-fieldname,
.hp-table tr:last-child .hp-data {
    border-bottom: none;
}

.fieldname { font-weight: 600; color: #1a1e21; }

.hp-individual a {
    color: var(--lp-link-color, #007cba);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hp-individual a:hover {
    color: var(--lp-link-hover-color, #005a87);
    text-decoration: underline;
}

.normal { font-size: var(--lp-font-size, 13px); line-height: 1.6; color: #1a1e21; }

.hp-error {
    text-align: center;
    color: #dc3545;
    font-weight: bold;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Tab Styles */
.hp-tabs {
    display: flex !important;
    border-bottom: 2px solid #ddd !important;
    margin: 20px 0 !important;
    background: none !important;
    list-style: none !important;
    padding: 0 !important;
}

.hp-tab-button {
    background: #f8f9fa !important;
    border: none !important;
    padding: 12px 20px !important;
    cursor: pointer !important;
    border-top: 3px solid transparent !important;
    font-weight: 500 !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit !important;
}

.hp-tab-button:hover {
    background: #e9ecef !important;
    color: #333 !important;
    text-decoration: none !important;
}

.hp-tab-button.active {
    background: #fff !important;
    border-top-color: #007cba !important;
    color: #007cba !important;
    text-decoration: none !important;
}

.hp-tab-content {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.hp-tab-content.active {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Source thumbnails */
.hp-source-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 120px;
}

.hp-source-thumbnail {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.hp-source-thumbnail:hover {
    transform: scale(1.1);
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.hp-source-number {
    font-weight: 600;
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
}

.hp-source-number:hover {
    color: #005a87;
    text-decoration: underline;
}

.hp-source-link {
    color: #1a1e21;
    text-decoration: none;
    font-weight: 600;
}

.hp-source-link:hover {
    color: #007cba;
    text-decoration: underline;
}

.hp-source-count {
    font-size: 10px;
    color: #666;
    align-self: center;
    font-weight: 500;
}

/* Photos section styles */
.hp-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
}

.hp-photo-item {
    text-align: center;
    max-width: 100px;
}

.hp-photo-item img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hp-photo-item img:hover {
    transform: scale(1.05);
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.hp-photo-title {
    font-size: 12px !important;
    color: #666;
    margin-top: 4px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 80px;
}

/* Social Media Share Buttons */
.hp-share-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px 0;
}

.hp-share-section a,
.hp-share-section button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1 !important;
}

.hp-share-section a:hover,
.hp-share-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hp-share-section svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Facebook button */
.hp-share-section a[href*="facebook"] {
    background: #1877f2;
}

.hp-share-section a[href*="facebook"]:hover {
    background: #166fe5;
}

/* Twitter/X button */
.hp-share-section a[href*="twitter"] {
    background: #000;
}

.hp-share-section a[href*="twitter"]:hover {
    background: #333;
}

/* Email button */
.hp-share-section a[href^="mailto"] {
    background: #666;
}

.hp-share-section a[href^="mailto"]:hover {
    background: #555;
}

/* Copy link button - More specific selectors to override theme styles */
.hp-share-section button[onclick*="lpCopyLink"] {
    background: #666 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.hp-share-section button[onclick*="lpCopyLink"]:hover {
    background: #555 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.hp-share-section button[onclick*="lpCopyLink"] svg {
    width: 20px !important;
    height: 20px !important;
    fill: white !important;
    display: block !important;
}

/* Back to top button */
.hp-back-to-top {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: #007cba !important;
    color: white !important;
    border-radius: 50% !important;
    text-align: center !important;
    line-height: 50px !important;
    font-size: 24px !important;
    cursor: pointer !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.hp-back-to-top:hover {
    background: #005a87 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.hp-back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Children list styling */
.hp-children-list {
    margin: 0;
    padding-left: 20px;
    list-style-position: outside;
}

.hp-children-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.hp-children-list li:last-child {
    margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .hp-individual { padding: 15px; }
    .section-title { padding: 12px 15px; font-size: 15px; }
    .hp-fieldname, .hp-data { padding: 10px 15px; }

    .hp-tab-button {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }

    .hp-ancestry-header {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .ancestry-photo img,
    .ancestry-photo .photo-placeholder {
        width: 100px;
        height: 125px;
    }

    .ancestry-name {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .ancestry-birth,
    .ancestry-death {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        margin-bottom: 10px;
    }

    .ancestry-label {
        min-width: auto;
    }

    .ancestry-details {
        font-size: 15px;
    }

    .hp-photos-grid {
        gap: 6px;
    }

    .hp-photo-item {
        max-width: 80px;
    }

    .hp-photo-item img {
        width: 60px !important;
        height: 60px !important;
    }

    .hp-photo-title {
        font-size: 9px !important;
        max-width: 60px;
    }
    
    .hp-share-section {
        justify-content: center;
        gap: 6px;
    }
    
    .hp-share-section a,
    .hp-share-section button {
        width: 32px;
        height: 32px;
    }
    
    .hp-share-section svg {
        width: 16px;
        height: 16px;
    }
    
    .hp-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
