.share-container {text-align: center; margin-top: 20px;}
#shareButton {margin-bottom:10px;padding: 10px 20px; font-size: 16px; background-color: #0a4771; color: white; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s, transform 0.2s;}
#shareButton:hover {background-color: #2e6aa7; transform: scale(1.05);}
.share-description {font-size: 12px; color: #666; margin-top: 5px;}
#SleepTimer {padding-bottom: 35px;}
#SleepTimer label {display: block; margin-bottom: 10px; font-size: 16px; color: #333; padding: 15px; font-weight: bold;}
#sleepTimer {width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); appearance: none; -webkit-appearance: none; cursor: pointer;}
#sleepTimer option {padding: 8px;}
#sleepTimer:focus {border-color: #0056b3; outline: none; box-shadow: 0 0 0 2px rgba(0,86,179,0.25);}
#sleepTimer:hover {border-color: #888;}
#timerDisplay {margin-top: 10px; padding: 10px; background-color: #f8f9fa; border: 1px solid #ccc; border-radius: 5px; text-align: center;}
#timerCountdown {font-size: 16px; margin-bottom: 10px;}
#cancelTimerBtn {background-color: #dc3545; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer;}
#cancelTimerBtn:hover {background-color: #c82333;}


.mark-btn.save {
    display: none;
}


.bold {background-color: #1775b4; border-radius: 4px; color: white;}
.activate-btn {display: block; margin: 20px auto; padding: 15px 30px; background-color: #1775b4; color: white; border: none; border-radius: 8px; font-size: 18px; cursor: pointer; transition: background-color 0.3s, transform 0.3s;}
.activate-btn:hover {background-color: #125182; transform: scale(1.05);}
#subtitle {font-family: Garamond, serif; font-size: 20px; line-height: 1.5; margin: 20px; padding: 10px; cursor: pointer; opacity: 0.8;}
#subtitle-wrapper {height: 200px; overflow-y: auto; display: block;}
#subtitle-wrapper:before, #subtitle-wrapper:after {content: ""; position: absolute; left: 0; width: 100%; height: 20px; pointer-events: none;}
#subtitle-wrapper:before {top: 0; background: linear-gradient(to top, transparent, white);}
#subtitle-wrapper:after {bottom: 0; background: linear-gradient(to bottom, transparent, white);}
#subtitle-wrapper::-webkit-scrollbar {width: 10px;}
#subtitle-wrapper::-webkit-scrollbar-track {background: #f1f1f1;}
#subtitle-wrapper::-webkit-scrollbar-thumb {background: #888; border-radius: 5px;}
#subtitle-wrapper::-webkit-scrollbar-thumb:hover {background: #555;}
.font-size-btn {padding: 10px; font-size: 16px; background-color: #1775b4; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px;}
.font-size-btn:hover {background-color: #125182;}
.font-size-display {font-size: 13px; margin-right: 10px; border: 1px solid #333; padding: 7px; border-radius: 3px;}
.copy-button {position: absolute; background-color: #1775b4; color: white; border: none; border-radius: 4px; padding: 5px 10px; cursor: pointer; display: none;}
::selection {background-color: lightyellow;}
.clickable {cursor: pointer;}
.clickable:hover {background-color: lightyellow;}

#shareMessage {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    white-space: normal; /* Allow the text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    overflow-wrap: break-word; /* Ensures wrapping for long words */
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    max-width: 100%;
}

/* CACHE BUTTONS */
#deleteCacheButton {
    background-color: #e74c3c; /* Red background */
    color: white; /* White text */
    border: none; /* Remove border */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Adjust font size */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease; /* Smooth background color transition */
}

#deleteCacheButton:hover {
    background-color: #c0392b; /* Darker red on hover */
}
#cacheButton {
    background-color: #3498db; /* Blue background */
    color: white; /* White text */
    border: none; /* Remove border */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Adjust font size */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease; /* Smooth background color transition */
}

#cacheButton:hover {
    background-color: #2980b9; /* Darker blue on hover */
}
#cancelButton {
    background-color: #7f8c8d; /* Gray background */
    color: white; /* White text */
    border: none; /* Remove border */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Adjust font size */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease; /* Smooth background color transition */
}

#cancelButton:hover {
    background-color: #606060; /* Darker gray on hover */
}
#progressDisplay {
    color: #34495e; /* Dark text for readability */
    font-size: 14px; /* Slightly smaller font size */
    padding: 10px; /* Padding for some spacing */
    margin-top: 10px; /* Space above the display */
    text-align: center; /* Center align text */
    font-weight: bold; /* Make the text stand out */
    display: inline-block; /* Fit content */
    width: auto; /* Auto width based on text */
}

#progressDisplay.success {
    color: #27ae60; /* Green text for success (e.g., "cache cleared") */
}

#progressDisplay.loading {
    color: #f39c12; /* Orange text for loading (e.g., showing *) */
}

/* END CACHE BUTTONS */
.tabdescarea {
    box-sizing: border-box;
    width: 100%;
    /* max-width: 600px; */
    padding: 10px;
    border: 1px solid #ccc;
    margin: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: justify;
    line-height: 1.5;
    border-radius: 5px;
    margin-bottom: 10px;
	font-size:13px;
}




.listen-on {display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px;padding:8px;}
.listen-on .button {display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; background-color: #333; color: #ffffff; text-decoration: none; border-radius: 5px; font-size: 16px; transition: background-color 0.3s ease;}
.listen-on .button:hover {background-color: #134d6b;}
.listen-on i {margin-right: 5px;}




.related-audiobooks .post-row-container {    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to the next line if necessary */
    justify-content: space-between;gap:8px; /* Adjusts spacing between items */}
.related-audiobooks .post-row {display: flex; overflow-x: auto; gap: 20px; scroll-behavior: smooth;}
.related-audiobooks .post-row::-webkit-scrollbar {display: none;}
.related-audiobooks .post-item {width: 290px; flex: 0 0 auto; background: #fff; border-radius: 10px; overflow: hidden; position: relative; transition: all 0.3s ease;}
.related-audiobooks .post-thumbnail {display: block; position: relative;}
.related-audiobooks .post-thumbnail img {width: 100%; height: auto; border-radius: 10px; transition: opacity 0.3s ease;}
.related-audiobooks .post-thumbnail:hover img {opacity: 0.7;}
.related-audiobooks .post-details {padding: 10px; text-align: left;}
.related-audiobooks .post-title {font-size: 1.2em; margin: 10px 0; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word;}
.related-audiobooks .post-title a {text-decoration: none; color: #333; display: block;}
.related-audiobooks .post-author {font-size: 0.9em; color: #666;}
@media (max-width: 768px) {.related-audiobooks .post-row-container {margin-left:3px;}}
.share-box {display: flex; justify-content: center; align-items: center; border: 1px solid #ccc; border-radius: 4px; padding: 10px;}
.share-icon {display: inline-block; font-size: 24px; color: #333; margin: 0 10px; text-decoration: none; transition: color 0.3s;}
.share-icon:hover {color: #0073e6;}
.book-options-container {display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 30px;}
.book-option {padding: 15px 20px; border-radius: 5px; text-align: center; text-decoration: none; font-family: 'Arial', sans-serif; color: #ffffff; transition: background-color 0.3s ease; display: flex; align-items: center; justify-content: center;}
.book-option.buy-book {flex: 1; background-color: #165a88;}
.book-option.read-online {flex: 2; background-color: #1f6ab0;}
.book-option i {margin-right: 10px; font-size: 18px;}
.book-option span {font-size: 16px; font-weight: bold;}
.book-option:hover {background-color: #0e4c75;}
.book-option.buy-book:hover {background-color: #134d6b;}
.book-option.read-online:hover {background-color: #174f82;}
.favorite-button {background-color: transparent; color: #333; flex: 0; padding: 10px; border: none; border-radius: 4px; transition: color 0.3s ease; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; font-size: 16px;}
.favorite-button i {font-size: 24px; margin-bottom: 5px;}
.favorite-button:hover {color: #eaeaea;}
.controls {position: static; z-index: 1000; text-align: center;}
.controls.read-along-active {position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; filter: invert(1);}
#ReadAlong.overlay {position: fixed; top: -20px; left: 0; width: 100%; height: 104%; background-color: rgba(0, 0, 0, 0.95); color: white; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; overflow: hidden;}
.overlay-header {box-shadow: none; position: fixed; top: 0; left: 50%; transform: translateX(-50%); display: flex; justify-content: space-between; align-items: center; padding: 10px; width: 90%; box-sizing: border-box; z-index: 10000; border-radius: 5px;}
#subtitle-wrapper {box-shadow: none; max-width: 800px; width: 100%; height: 60%; overflow-y: auto; text-align: center; margin-top: 40px;}
#subtitle {font-size: 26pt; line-height: 1.5;}
#subtitle .current-line {color: white; font-weight: bold;}
#subtitle .faded-line {color: rgba(255, 255, 255, 0.5);}
.listened-chapter {color: lightgray; opacity: 0.7;}
@media (min-width: 768px) {.overlay-header {justify-content: center; padding: 8px; width: 80%;} .end-transcript-btn {flex-grow: 1; font-size: 12px; padding: 6px 12px;} .font-size-btn {flex-grow: 1; font-size: 12px; padding: 6px 12px; margin-left: 5px;} .overlay-header button {flex-basis: auto; max-width: 200px;} .listen-on {font-size: 13px;}}

body.no-scroll, body.no-scroll * {overflow: hidden !important;}






/* ==========================================================
   Description Area Makeover V2
   ========================================================== */

/* The NEW outer wrapper. This is the wide, visible card. */
.audiobook-description-wrapper {
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 2rem;
    margin: 2rem auto 0 auto;
    /* NO max-width here, so it can be wide on desktop */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
	width:100%;
}

/* The inner text container. Its only job is to control text width. */
.audiobook-text-content {
    max-width: 750px; /* This keeps the text readable */
    margin: 0 auto;   /* Center the text block within the wide wrapper */
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out; /* Smooth transition */
}

/* The heading inside the text container */
.audiobook-text-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

/* Improve readability of the paragraphs */
.audiobook-text-content p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #495057;
}

/* This is the class your JS adds to truncate the text */
.audiobook-text-content.collapsed {
    max-height: 250px; /* Adjust this value as needed for the preview height */
}

/* Add a fade-out effect at the bottom when collapsed */
.audiobook-text-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #f8f9fa 90%);
    pointer-events: none;
}

/* Container for the buttons */
.button-container {
    text-align: center;
    padding-top: 1.5rem;
}

/* Shared style for both buttons */
.read-more-btn,
.close-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.read-more-btn:hover,
.close-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.read-more-btn i,
.close-btn i {
    margin-right: 8px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .audiobook-description-wrapper {
        padding: 1.5rem;
        border-radius: 0;
    }
    .audiobook-text-content h2 {
        font-size: 1.5rem;
    }
    .audiobook-text-content p {
        font-size: 1rem;
    }
}







.end-transcript-btn {flex-grow: 3; padding: 8px 16px; font-size: 20px; color: #fff; background-color: #444; border: none; border-radius: 5px; text-align: center; padding-right: 26px;}
.end-transcript-btn:hover {background-color: #1775b4; cursor: pointer;}
.font-size-btn {flex-grow: 1; padding: 8px 12px; font-size: 14px; color: #fff; background-color: #555; border: none; border-radius: 5px; margin-left: 10px; display: flex; align-items: center; justify-content: center;}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* Apply the fade-in animation to the post items within the related-audiobooks-content */
#related-audiobooks-content .post-item {
    opacity: 0; /* Start invisible */
    animation: fadeIn 1s ease-in forwards; /* Apply the fade-in animation */
}

/* Optional: Add a staggered effect */
#related-audiobooks-content .post-item:nth-child(1) {
    animation-delay: 0.1s;
}
#related-audiobooks-content .post-item:nth-child(2) {
    animation-delay: 0.2s;
}
#related-audiobooks-content .post-item:nth-child(3) {
    animation-delay: 0.3s;
}
/* Add more nth-child selectors if you have more items */



.time-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none; /* Hidden by default */
}

.time-overlay-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#dismissTimeOverlay {
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #1f6ab0;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

#dismissTimeOverlay:hover {
    background-color: #155a80;
}


.faded-line {
  opacity: 0.5; /* Adjust opacity as needed */
}

.faded-line.top {
  margin-bottom: -10px; /* Adjust spacing as needed */
}

.faded-line.bottom {
  margin-top: -10px; /* Adjust spacing as needed */
}


.listenonplatform {    text-align: center;
    font-weight: bold;
    font-size: 1.0em;
    color: #333;
    margin-bottom: 10px;
    background-color: #fff;
    padding: 11px;
    border-radius: 5px;
    vertical-align: middle;
    margin-top: 10px;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Rounds the corners */
    margin-right: 10px; /* Adds space between the image and the author name */
    object-fit: cover; /* Ensures the image maintains aspect ratio within the circle */
    border: 2px solid #ccc; /* Optional: adds a border around the image */
}


/* tweak ONLY on small screens */
@media (max-width:480px){
    /* kill the section’s built‑in padding */
    #related-audiobooks{
        padding:0!important;
    }

    /* keep an even 8 px gutter *inside* the grid */
    #related-audiobooks-content.post-row-container{
        display:grid!important;            /* two‑up grid we already set   */
        grid-template-columns:repeat(2,1fr);
        gap:.75rem;
        padding:0 8px;                     /* 8 px left + right, symmetrical */
        margin:0!important;                /* no extra indents             */
        max-width:none!important;          /* let it span full viewport    */
    }

    #related-audiobooks-content .post-item{
        margin:0!important;                /* tighten vertical spacing     */
        width:100%;
    }
}







/* ==========================================================
   Loading Animation for Player Timestamps
   ========================================================== */

/* The container for our pulsing dots */
.time-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px; /* Give it some space to live in */
}

/* Individual pulsing dot */
.time-loader span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #98b8cf; /* A soft color from your progress bar */
    border-radius: 50%;
    animation: time-pulse 1.4s infinite ease-in-out both;
}

/* Animation delay for each dot to create the wave effect */
.time-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.time-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

/* The keyframe animation for the pulse effect */
@keyframes time-pulse {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}