/* Tree of Links Module Styles - ElyseHofer.vip Branding */

/* Import Brand Fonts */
@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Lato:wght@300;400;500;600;700&family=Beau+Rivage&display=swap');

/* Brand CSS Variables */
:root {
    --brand-primary: #1B1F36;
    --brand-secondary: #D8B7C3;
    --text-heading: #0F1321;
    --text-body: #5E6473;
    --accent-light: #F7F3F6;
    --accent-dark: #A25E6B;
    --font-heading: 'Abril Fatface', serif;
    --font-body: 'Lato', Helvetica, Arial, Lucida, sans-serif;
    --font-decorative: 'Beau Rivage', cursive;
}

/* Edit Icon Inline with Tree Title */
.lh-tree-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    color: inherit;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    vertical-align: middle;
    text-decoration: none;
}

.lh-tree-edit-icon:hover {
    opacity: 0.8;
}

.lh-tree-edit-icon svg {
    display: block;
}

/* Hide default WordPress post elements on ALL tree pages */
.lh-tree-page .entry-header,
.lh-tree-page .entry-meta,
.lh-tree-page .entry-footer,
.lh-tree-page .post-navigation,
.lh-tree-page .author-info,
.lh-tree-page .page-header,
.lh-tree-page .entry-title,
.lh-tree-page .posted-on,
.lh-tree-page .byline,
.lh-tree-page .cat-links,
.lh-tree-page .tags-links,
.lh-tree-page .comments-link,
.lh-tree-page .edit-link,
.lh-tree-page h1.entry-title,
.lh-tree-page .post-meta,
.lh-tree-page .author-bio {
    display: none !important;
}

/* Hide theme header/footer when blank template mode is enabled */
.lh-blank-template #page-header,
.lh-blank-template #main-header,
.lh-blank-template .site-header,
.lh-blank-template #site-header,
.lh-blank-template header:not(#wpadminbar):not(.admin-bar),
.lh-blank-template #masthead,
.lh-blank-template .navbar,
.lh-blank-template #site-navigation,
.lh-blank-template #main-footer,
.lh-blank-template .site-footer,
.lh-blank-template #site-footer,
.lh-blank-template footer:not(#wpadminbar):not(.admin-bar),
.lh-blank-template #colophon,
.lh-blank-template .site-info,
.lh-blank-template #sidebar,
.lh-blank-template .sidebar,
.lh-blank-template aside,
.lh-blank-template .breadcrumbs,
.lh-blank-template .breadcrumb,
.lh-blank-template nav:not(#wpadminbar):not(.admin-bar) {
    display: none !important;
}

/* Never hide admin bar */
#wpadminbar {
    display: block !important;
}

/* Ensure blank template has clean layout */
.lh-blank-template {
    margin: 0 !important;
    padding: 0 !important;
}

.lh-blank-template #content,
.lh-blank-template .site-content,
.lh-blank-template #main,
.lh-blank-template main,
.lh-blank-template .content-area,
.lh-blank-template article,
.lh-blank-template .hentry {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Base Container */
.lh-tree-of-links {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mixed mode - has both bars and cards */
.lh-tree-of-links.lh-mixed-content {
    max-width: 800px;
}

/* ==============================
   Legacy Bar Style (Linktree-like)
   ============================== */
.lh-bar-style {
    width: 100%;
}

.lh-bar-style .lh-bar-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--lh-radius, 12px);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--brand-secondary, #D8B7C3);
    box-shadow: 0 2px 12px rgba(27, 31, 54, 0.08);
}

.lh-bar-style .lh-bar-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(162, 94, 107, 0.15);
    border-color: var(--accent-dark, #A25E6B);
}

/* Thumbnail on left */
.lh-bar-style .lh-bar-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
}

.lh-bar-style .lh-bar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Icon on left (when no thumbnail) */
.lh-bar-style .lh-bar-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

/* Title centered */
.lh-bar-style .lh-bar-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: clamp(12px, 4vw, 18px);
    font-family: var(--font-body, 'Lato', Helvetica, Arial, Lucida, sans-serif);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* More dots on right */
.lh-bar-style .lh-bar-more {
    width: 24px;
    flex-shrink: 0;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================
   Legacy Card Style (Linktree-like)
   ============================== */
.lh-card-style {
    width: 100%;
}

.lh-card-style .lh-card-link {
    display: block;
    text-decoration: none;
    border-radius: var(--lh-radius, 12px);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--brand-secondary, #D8B7C3);
    box-shadow: 0 2px 12px rgba(27, 31, 54, 0.08);
}

.lh-card-style .lh-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(162, 94, 107, 0.15);
    border-color: var(--accent-dark, #A25E6B);
}

/* Full-width image */
.lh-card-style .lh-card-image {
    width: 100%;
    line-height: 0;
}

.lh-card-style .lh-card-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Title banner below image */
.lh-card-style .lh-card-banner {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    position: relative;
}

.lh-card-style .lh-card-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: clamp(11px, 4vw, 16px);
    font-family: var(--font-body, 'Lato', Helvetica, Arial, Lucida, sans-serif);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lh-card-style .lh-card-more {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

/* ==============================
   Legacy Heading Style (Section Divider)
   ============================== */
.lh-heading-style {
    width: 100%;
    text-align: center;
    padding: clamp(12px, 3vw, 20px) 0 clamp(6px, 1.5vw, 12px);
}

.lh-heading-style .lh-heading-text {
    font-family: var(--font-heading, 'Abril Fatface', serif);
    font-weight: 600;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0.5px;
    color: var(--text-heading, #0F1321);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Heading Sizes - all larger than bar/card text (which is 0.875rem-1rem) */
.lh-heading-small .lh-heading-text {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
}

.lh-heading-medium .lh-heading-text {
    font-size: clamp(1.05rem, 3vw, 1.3rem);
}

.lh-heading-large .lh-heading-text {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

/* When in mixed mode or all-card mode, use grid layout for cards */
.lh-tree-of-links.lh-mode-all-card,
.lh-tree-of-links.lh-mixed-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* But bar items and headings in mixed mode should span full width */
.lh-tree-of-links.lh-mixed-content .lh-bar-style,
.lh-tree-of-links.lh-mixed-content .lh-heading-style {
    grid-column: 1 / -1;
}

/* Placeholder (visible only in builder/admin) */
.lh-placeholder {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
}

.lh-placeholder p {
    margin: 0;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lh-bar-style .lh-link {
        padding: 12px 16px;
    }
    
    .lh-tree-of-links.lh-mode-all-card,
    .lh-tree-of-links.lh-mixed-content {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .lh-card-style .lh-card-figure {
        padding: 15px;
    }
}

/* Link Container Module */
.lh-link-container {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.lh-link-container:hover {
    text-decoration: none;
}

/* Hover effects for Link Container */
.lh-link-container.lh-hover-scale {
    transition: transform 0.3s ease;
}

.lh-link-container.lh-hover-scale:hover {
    transform: scale(1.02);
}

.lh-link-container.lh-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lh-link-container.lh-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Link Container preview mode */
.lh-link-container.lh-preview {
    cursor: default;
    opacity: 0.9;
}

/* Link Type Module Styles */
.lh-link-title-module {
    margin: 0;
}

.lh-link-image-module {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Link Image Module - base styles only, border-radius comes from Divi settings */
.LH_link_image .lh-link-image {
    overflow: hidden;
    line-height: 0;
}

.LH_link_image .lh-link-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.lh-link-icon-module {
    display: inline-block;
}

.lh-link-button-module {
    display: inline-block;
    cursor: pointer;
}

.lh-link-stats-module {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #666;
}

/* ==============================
   Tree Page Styles
   ============================== */

/* Main tree container */
.lh-tree {
    width: 100%;
    max-width: 576px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    min-height: 100vh;
    box-sizing: border-box;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

/* Mobile: Full width with no padding on sides */
@media (max-width: 768px) {
    body.lh-tree-page {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body.admin-bar.lh-tree-page {
        padding-top: 46px !important;
    }
    
    .lh-tree {
        max-width: 100%;
        width: 100%;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0;
    }
    
    .lh-tree-header {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .lh-tree-avatar {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .lh-tree-avatar .lh-avatar-image {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        border-radius: 0 !important;
    }
    
    /* Remove all border radius on mobile */
    .lh-hero-rounded .lh-avatar-image,
    .lh-hero-round .lh-avatar-image,
    .lh-hero-square .lh-avatar-image {
        border-radius: 0 !important;
    }
    
    /* Remove border radius from fade effect on mobile */
    .lh-hero-rounded .lh-avatar-fade::after,
    .lh-hero-round .lh-avatar-fade::after {
        border-radius: 0 !important;
    }
    
    /* Add spacing after avatar on mobile */
    .lh-tree-title {
        margin-top: 16px !important;
    }
}

/* Remove top padding/margin when tree is at page top */
.lh-tree-page .site-content,
.lh-tree-page #content,
.lh-tree-page main,
.lh-tree-page article,
.lh-tree-page .content-area,
.lh-tree-page .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* On mobile, remove ALL padding from WordPress containers */
@media (max-width: 768px) {
    .lh-tree-page .site-content,
    .lh-tree-page #content,
    .lh-tree-page main,
    .lh-tree-page article,
    .lh-tree-page .content-area,
    .lh-tree-page .entry-content {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body.lh-tree-page {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body.admin-bar.lh-tree-page {
        padding-top: 46px !important;
    }
}

/* Ensure tree background starts at top of page (but allow for admin bar) */
body.lh-tree-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Keep admin bar space when logged in */
body.admin-bar.lh-tree-page {
    padding-top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar.lh-tree-page {
        padding-top: 46px !important;
    }
}

.lh-tree {
    margin-top: 0 !important;
}

/* Tree Header Section */
.lh-tree-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    margin-left: -20px;
    margin-right: -20px;
    margin-top: 0;
}

.lh-tree-avatar {
    margin-bottom: 16px;
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    background-color: var(--lh-bg-color, #f5f5f5);
}

.lh-tree-avatar .lh-avatar-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Hero Image Shapes */
.lh-hero-round .lh-avatar-image {
    border-radius: 50%;
}

.lh-hero-rounded .lh-avatar-image {
    border-radius: 16px;
}

.lh-hero-square .lh-avatar-image {
    border-radius: 0;
}

/* Hero Fade Effect */
.lh-avatar-fade {
    position: relative;
}

.lh-avatar-fade::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(to bottom, transparent 0%, var(--lh-bg-color, #f5f5f5) 100%);
    pointer-events: none;
}

/* Round shape with fade */
.lh-hero-round .lh-avatar-fade::after {
    border-radius: 0 0 50% 50%;
}

/* Rounded shape with fade */
.lh-hero-rounded .lh-avatar-fade::after {
    border-radius: 0 0 16px 16px;
}

.lh-tree-title {
    margin: 0 0 12px 0;
    font-size: clamp(20px, 6vw, 32px);
    font-weight: 700;
    color: #1a1a1a;
    padding: 0 20px;
}

.lh-tree-about {
    color: #555;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

.lh-tree-about p {
    margin: 0 0 10px 0;
}

.lh-tree-about p:last-child {
    margin-bottom: 0;
}

/* Social Links Bar */
.lh-social-links {
    margin: 20px 0 30px 0;
    padding: 0 20px;
}

.lh-social-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.lh-social-item {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0;
}

.lh-social-item::before,
.lh-social-item::marker {
    content: none !important;
    display: none !important;
}

.lh-social-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lh-social-item a:hover {
    background: #333;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lh-social-item a svg {
    width: 20px;
    height: 20px;
}

/* Social Icon Style Variations */

/* Circle (default) */
.lh-social-circle .lh-social-item a {
    border-radius: 50%;
}

/* Rounded Square */
.lh-social-rounded .lh-social-item a {
    border-radius: 8px;
}

/* Square */
.lh-social-square .lh-social-item a {
    border-radius: 0;
}

/* Minimal - no background */
.lh-social-minimal .lh-social-item a {
    background: transparent;
    width: auto;
    height: auto;
    padding: 8px;
}

.lh-social-minimal .lh-social-item a:hover {
    background: transparent;
    transform: scale(1.2);
    box-shadow: none;
}

/* Platform-specific colors on hover */
.lh-social-twitter a:hover {
    background: #1da1f2;
}

.lh-social-facebook a:hover {
    background: #1877f2;
}

.lh-social-instagram a:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.lh-social-linkedin a:hover {
    background: #0a66c2;
}

.lh-social-youtube a:hover {
    background: #ff0000;
}

.lh-social-tiktok a:hover {
    background: #000;
}

.lh-social-pinterest a:hover {
    background: #e60023;
}

.lh-social-github a:hover {
    background: #24292e;
}

.lh-social-email a:hover {
    background: #ea4335;
}

/* Tree Links Section */
.lh-tree-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
}

.lh-tree-links.lh-tree-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 12px;
}

.lh-tree-links.lh-tree-empty p {
    margin: 0;
    color: #666;
}

/* Heading Styles */
.lh-heading {
    text-align: center;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lh-heading-small {
    font-size: 14px;
    margin: 16px 0 8px 0;
}

.lh-heading-medium {
    font-size: 18px;
    margin: 24px 0 12px 0;
}

.lh-heading-large {
    font-size: 24px;
    margin: 32px 0 16px 0;
}

/* Link Item Wrapper (from LinkTypeRenderer) */
.lh-link-item-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
}

.lh-link-item-wrapper:hover {
    text-decoration: none;
}

/* Responsive adjustments for tree */
@media (max-width: 768px) {
    .lh-tree {
        max-width: 100%;
        padding: 15px;
    }

    .lh-tree-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lh-tree-avatar {
        max-width: 70%;
        width: 70%;
        margin: 0 auto 16px auto;
    }

    .lh-tree-avatar .lh-avatar-image {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .lh-social-item a {
        width: 40px;
        height: 40px;
    }

    .lh-social-item a svg {
        width: 18px;
        height: 18px;
    }
}

/* Collections */
.lh-collection {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}
.lh-collection-title {
    padding: 12px 15px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.lh-collection-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

