/* Floating prev/next navigation */
.floating-post-nav { position: fixed; top: 50%; left: 0; right: 0; transform: translateY(-50%); pointer-events: none; }
.floating-post-nav .prev, .floating-post-nav .next { position: absolute; pointer-events: auto; }
.floating-post-nav .prev { left: 12px; }
.floating-post-nav .next { right: 12px; }
.floating-post-nav .arrow { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 0; background: var(--card-background); border: 1px solid var(--light-gray); color: var(--text-color); box-shadow: var(--card-shadow); cursor: pointer; }
.floating-post-nav .arrow:hover { border-color: var(--secondary-color); }

/* Share Button Styles */
.share-button-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.share-button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.share-button:hover {
    filter: brightness(1.1);
}

.share-options {
    display: none;
    position: absolute;
    bottom: 100%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1001;
    width: 120px; /* Fixed width */
    margin-bottom: 5px; /* Space between button and options */
}

.share-options a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    text-align: center;
}

.share-options a:hover {
    background-color: var(--primary-color-light-bg);
}

.share-options a:first-child {
    border-bottom: 1px solid #ddd;
}

/*--------------------------------------------------------------
# Miscellaneous Styles
--------------------------------------------------------------*/

/* Post Edit Link */
.post-edit-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9em;
    color: var(--primary-color);
    text-decoration: none;
}

.post-edit-link:hover {
    color: var(--secondary-color);
}

.theme-toggle {
    margin-left: 12px;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #F3F3F3;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.theme-toggle-button:hover {
    background-color: #F3F3F3;
}

[data-theme='dark'] .theme-toggle-button {
    background-color: #3D3E40;
}

[data-theme='dark'] .theme-toggle-button:hover {
    background-color: #3D3E40;
}

.theme-toggle-button img {
    position: absolute;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    width: 24px;
    height: 24px;
}

.theme-icon-sun {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

.theme-icon-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme='dark'] .theme-icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

[data-theme='dark'] .theme-icon-moon {
    opacity: 0;
    transform: scale(0) rotate(-90deg);
}

.back-to-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    display: none; /* Hidden by default */
    z-index: 100;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s, visibility 0.3s;
}

.back-to-top-button:hover {
    background-color: var(--secondary-color);
}