/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Targeted fix for the sidebar links shown in image_9b15c0.jpg */
.sidebar .widget a {
    font-size: 22px !important;
    text-transform: none !important;
    line-height: 1 !important;
    font-weight: 600;
}

/* Reduces the gap between the news category links */
.sidebar .widget br {
    display: block;
    content: "";
    margin-top: 5px;
}

/* Tighten the vertical spacing between sidebar links */
.sidebar .widget a {
    display: inline-block; /* Allows us to control margins better */
    margin-bottom: 5px !important; /* Forces a smaller gap */
    line-height: 1.2 !important;
}

/* If the links are inside a list (ul/li), remove the list padding */
.sidebar .widget ul li {
    margin-bottom: 2px !important;
    padding-bottom: 0 !important;
}

/* If the links are separated by paragraph tags, remove the p-tag margin */
.sidebar .widget p {
    margin-bottom: 5px !important;
}

/* Make Primary Navigation Sticky */

/* Make the entire header (Title + Menu) sticky */
.site-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    z-index: 9999;
    background-color: #ffffff; /* Ensures the header isn't transparent when scrolling */
}

/* Adjust for the WordPress admin bar when logged in */
.admin-bar .site-header {
    top: 32px;
}

/* Remove the fixed positioning from the navigation so it stays inside the header */
#site-navigation {
    position: relative !important;
}

/* Ensure parents allow the sticky behavior to work */
#page, body, html {
    overflow: visible !important;
}

/* Brute force tighter sidebar spacing */
/* Refined sidebar spacing for better legibility */
.sidebar .widget a {
    display: block !important;
    margin-bottom: 8px !important; /* Increased from 0 or 5 for a tiny bit more breathing room */
    padding-bottom: 0 !important;
    line-height: 1.2 !important; /* Slightly increased to prevent the text from feeling squashed */
    text-decoration: underline; /* Matches the style seen in your screenshot */
}

/* Ensure the container doesn't add extra hidden gaps */
.sidebar .widget p, 
.sidebar .widget ul, 
.sidebar .widget li {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Keep the widget headline "Upcoming Events" spaced away from the list above */
.sidebar .widget h2, 
.sidebar .widget .widget-title {
    margin-top: 20px !important;
    margin-bottom: 10px !important;
}

/* Adds the black divider line under the header */
.site-header {
    border-bottom: 2px solid #000000; /* Adjust the 2px if you want it thicker or thinner */
    padding-bottom: 5px; /* Adds a small gap between the menu and the line */
}



/* Floating Copy Buttons — Events Calendar Version */

.single-tribe_events .copy-share-box {
    position: fixed;
    top: 150px;
    right: -200px; /* off-screen start */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    opacity: 1;
    transition: right 0.4s ease, opacity 0.3s ease;
}

/* Slide-in active state */
.single-tribe_events .copy-share-box.visible {
    right: 20px;
}

/* Auto-hide */
.single-tribe_events .copy-share-box.hidden {
    opacity: 0;
}

/* Button styling */
.single-tribe_events .copy-btn {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px; /* pill shape */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.single-tribe_events .copy-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .single-tribe_events .copy-share-box {
        top: auto !important;
        bottom: 20px !important;
        right: -200px;
        gap: 8px;
    }
    .single-tribe_events .copy-share-box.visible {
        right: 20px;
    }
    .single-tribe_events .copy-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Extra-small screens */
@media (max-width: 400px) {
    .single-tribe_events .copy-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .single-tribe_events .copy-share-box {
        bottom: 15px !important;
        gap: 6px;
    }
}


/* Floating Copy Buttons on Single Posts */
.single-post .copy-share-box {
    position: fixed;
    top: 150px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.single-post .copy-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.single-post .copy-btn:hover {
    background: #333;
}

/* Mobile: move floating buttons to bottom-right */
/* Base floating button container */
.single .copy-share-box {
    position: fixed;
    top: 150px;
    right: -200px; /* start off-screen for slide-in */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    opacity: 1;
    transition: right 0.4s ease, opacity 0.3s ease;
}

/* Slide-in active state */
.single .copy-share-box.visible {
    right: 20px;
}

/* Button styling */
.single .copy-btn {
    background: rgba(0, 0, 0, 0.75); /* slight transparency */
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 999px; /* pill shape */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px); /* subtle glass effect */
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.single .copy-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

/* Auto-hide class */
.single .copy-share-box.hidden {
    opacity: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .single .copy-share-box {
        top: auto !important;
        bottom: 20px !important;
        right: -200px; /* off-screen start */
        gap: 8px;
    }

    .single .copy-share-box.visible {
        right: 20px;
    }

    .single .copy-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Extra-small screens */
@media (max-width: 400px) {
    .single .copy-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .single .copy-share-box {
        bottom: 15px !important;
        gap: 6px;
    }
}
