/**
 * Site Link Manager - Frontend Styles
 * Designed to blend seamlessly with any WordPress theme
 * Uses inheritance and relative units to adapt to theme styles
 */

/* ================================================
   Base Wrapper - Inherits theme styles
   ================================================ */
.sl-anchor-wrapper {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    box-sizing: border-box;
    width: 100%;
    clear: both;
    /* Ensure it stays below floated post grids */
    position: relative;
    z-index: 10;
    /* Keep it above background but don't let it overly expand over posts */
    margin-top: 40px;
    /* Safe distance from the content above */
}

.sl-anchor-wrapper *,
.sl-anchor-wrapper *::before,
.sl-anchor-wrapper *::after {
    box-sizing: border-box;
}

/* ================================================
   Links Container
   ================================================ */
.sl-links-container {
    display: inline;
}

.sl-link-item {
    display: inline;
}

.sl-link-item+.sl-link-item::before {
    content: ' · ';
    color: inherit;
    opacity: 0.3;
    margin: 0 0.25em;
}

a.sl-anchor-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    opacity: 0.75;
    transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}

a.sl-anchor-link:hover {
    opacity: 1;
    text-decoration-style: solid;
}

/* ================================================
   Section Label
   ================================================ */
.sl-section-label {
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
    margin-right: 0.8em;
}

/* ================================================
   Style: Subtle
   Blends completely with the theme
   ================================================ */
.sl-style-subtle.sl-context-after-content {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid currentColor;
    border-top-color: inherit;
    opacity: 0.6;
    font-size: 0.85em;
}

.sl-style-subtle.sl-context-before-content {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid currentColor;
    border-bottom-color: inherit;
    opacity: 0.6;
    font-size: 0.85em;
}

/* ================================================
   Style: Partner
   Shows as a distinct partner/sponsor section
   ================================================ */
.sl-style-partner.sl-context-after-content {
    margin-top: 2em;
    padding: 1.2em 1.5em;
    background: rgba(128, 128, 128, 0.04);
    border: 1px solid rgba(128, 128, 128, 0.1);
    border-radius: 8px;
    font-size: 0.85em;
}

.sl-style-partner .sl-section-label {
    display: block;
    margin-bottom: 0.6em;
    opacity: 0.4;
    font-size: 0.75em;
}

/* ================================================
   Style: Related
   Looks like "related links" section
   ================================================ */
.sl-style-related.sl-context-after-content {
    margin-top: 2.5em;
    padding: 1.5em;
    border-left: 3px solid currentColor;
    border-left-color: inherit;
    opacity: 0.7;
    font-size: 0.9em;
}

.sl-style-related .sl-section-label {
    display: block;
    margin-bottom: 0.6em;
    font-size: 0.9em;
    opacity: 0.6;
}

.sl-style-related .sl-link-item {
    display: block;
    padding: 0.3em 0;
}

.sl-style-related .sl-link-item+.sl-link-item::before {
    display: none;
}

.sl-style-related a.sl-anchor-link::before {
    content: '→ ';
    opacity: 0.4;
}

/* ================================================
   Style: Minimal
   Just plain links, nothing else
   ================================================ */
.sl-style-minimal.sl-context-after-content {
    margin-top: 2em;
    font-size: 0.85em;
    opacity: 0.6;
}

.sl-style-minimal a.sl-anchor-link {
    text-decoration: none;
}

.sl-style-minimal a.sl-anchor-link:hover {
    text-decoration: underline;
}

/* ================================================
   Footer Placement
   ================================================ */
.sl-footer-wrapper {
    padding: 15px 0;
    margin-bottom: 1.5em;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
    color: inherit;
    transition: opacity 0.3s ease;
    width: 100%;
    clear: both;
}

.sl-footer-wrapper:hover {
    opacity: 0.9;
}

.sl-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.sl-footer-wrapper .sl-section-label {
    font-size: 11px;
    margin-right: 1em;
}

.sl-footer-wrapper a.sl-anchor-link {
    opacity: 0.85;
    font-size: 12px;
}

.sl-footer-wrapper .sl-link-item+.sl-link-item::before {
    content: ' · ';
    display: inline;
    opacity: 0.2;
}

/* ================================================
   Widget Placement
   ================================================ */
.sl-widget-wrapper {
    font-size: inherit;
}

.sl-widget-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sl-widget-link-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.sl-widget-link-item:last-child {
    border-bottom: none;
}

.sl-widget-link-item a.sl-anchor-link {
    display: block;
    padding: 4px 0;
    font-size: 0.9em;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease, padding-left 0.2s ease;
}

.sl-widget-link-item a.sl-anchor-link:hover {
    opacity: 1;
    padding-left: 6px;
}

/* ================================================
   Right Side Content Placement
   ================================================ */
.sl-right-content-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5em;
}

.sl-context-right-content {
    float: right;
    width: 200px;
    margin: 0 0 15px 25px;
    padding: 12px;
    background: rgba(128, 128, 128, 0.03);
    border: 1px solid rgba(128, 128, 128, 0.08);
    border-radius: 8px;
    font-size: 0.85em;
}

.sl-context-right-content .sl-section-label {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
}

.sl-context-right-content .sl-link-item {
    display: block;
    padding: 4px 0;
}

.sl-context-right-content .sl-link-item+.sl-link-item::before {
    display: none;
}

.sl-main-content-wrapper {
    overflow: hidden;
    /* Clearfix behavior */
}

/* ================================================
   Responsive adjustments
   ================================================ */
@media (max-width: 768px) {
    .sl-context-right-content {
        float: none;
        width: 100%;
        margin: 0 0 1.5em 0;
    }

    .sl-style-partner.sl-context-after-content,
    .sl-style-related.sl-context-after-content {
        padding: 1em;
    }

    .sl-footer-inner {
        padding: 10px 16px;
    }
}

/* ================================================
   Print styles - hide links
   ================================================ */
@media print {
    .sl-anchor-wrapper {
        display: none !important;
    }
}