/* Series and Tabs Styling */
.tab-navigation {
    margin-bottom: 30px;
}

.nav-tabs {
    border-bottom: 2px solid #ddd;
}

.nav-tabs > li {
    margin-bottom: -2px;
}

.nav-tabs > li > a {
    margin-right: 2px;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
    color: #555;
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-tabs > li > a:hover {
    border-color: #eee #eee #ddd;
    background-color: #eee;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: #555;
    cursor: default;
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom-color: transparent;
}

.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Series share button */
.series-share-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.8em;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.series-share-btn:hover {
    background-color: #f0f0f0;
    color: #007acc;
    transform: translateY(-1px);
}

.series-share-btn:active {
    transform: translateY(0);
}

/* Share notification */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 350px;
    font-size: 14px;
}

.share-notification.error {
    background: #dc3545;
}

.share-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-content i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    margin-bottom: 4px;
}

.notification-text small {
    opacity: 0.9;
    line-height: 1.3;
}
.series-container {
    padding: 30px 0;
}

.series-timeline {
    position: relative;
}

.series-header {
    padding: 20px 25px;
    margin-bottom: 20px;
    border: 2px solid #f0f4f8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.series-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(45deg, #0085a1, #00a8cc);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.series-header:hover::before {
    transform: scaleY(1);
}

.series-header:hover {
    border-color: #0085a1;
    box-shadow: 0 8px 25px rgba(0,133,161,0.15);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.series-title {
    color: #2d3748 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.2em;
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
}

.series-title:hover {
    color: #0085a1 !important;
}

.series-header .post-count {
    background: linear-gradient(45deg, #0085a1, #00a8cc);
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em !important;
    font-weight: 600;
    margin-left: 15px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,133,161,0.2);
}

/* General post-count styling for other pages like archive */
.post-count {
    font-size: 0.7em;
    color: #888;
    margin-left: 10px;
}

.series-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: #64748b;
    font-weight: 500;
}

.series-share-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 10px;
    cursor: pointer;
}

.series-share-btn:hover {
    background: #f1f5f9;
    color: #0085a1;
    transform: scale(1.1);
}

/* Modal Styling */
.series-popup-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Series listing page modal - specific styling */
#seriesModal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#seriesModal.show {
    display: flex !important;
}

.series-popup-modal.show {
    display: flex !important;
}

.series-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.series-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    pointer-events: auto;
    z-index: 1070 !important;
    background-color: #fff !important;
    border: 1px solid rgba(0,0,0,.125) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
}

@media (min-width: 768px) {
    .series-modal-dialog {
        max-width: 700px;
    }
}

@media (min-width: 992px) {
    .series-modal-dialog {
        max-width: 800px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .series-popup-modal,
    #seriesModal {
        padding: 10px;
    }
    
    .series-modal-dialog {
        max-width: 100%;
    }
    
    .series-modal-content {
        max-height: calc(100vh - 20px);
    }
    
    .series-modal-body {
        max-height: calc(100vh - 120px);
        padding: 16px;
    }
    
    .series-modal-header {
        padding: 16px 20px 12px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .series-modal-title {
        font-size: 1.3em;
        flex: 1 1 100%;
        order: 1;
    }
    
    .series-modal-controls {
        flex: 1 1 100%;
        order: 2;
        justify-content: space-between;
    }
    
    .series-latest-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}

.series-modal-content {
    position: relative;
    background-color: #fff !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    outline: 0;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: 1080 !important;
    color: #333 !important;
    width: 100%;
}

.series-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 140px); /* Account for header height and padding */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

/* Custom scrollbar for webkit browsers */
.series-modal-body::-webkit-scrollbar {
    width: 8px;
}

.series-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.series-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.series-modal-body::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Smooth scrolling */
.series-modal-body {
    scroll-behavior: smooth;
}

/* Scroll indicator */
.scroll-indicator {
    position: sticky;
    bottom: 0;
    background: linear-gradient(transparent, rgba(255,255,255,0.9));
    text-align: center;
    padding: 10px;
    pointer-events: none;
}

.scroll-hint {
    color: #666;
    font-size: 0.85em;
    animation: fadeInOut 2s infinite;
}

.scroll-hint i {
    margin-right: 5px;
    animation: bounce 1s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1px); }
}

/* Series Pagination */
.series-pagination {
    margin-top: 40px;
    border-top: 2px solid #f0f4f8;
    padding-top: 30px;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pagination-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    color: #475569;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0085a1 0%, #00a8cc 100%);
    border-color: #0085a1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,133,161,0.2);
}

.pagination-btn:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    color: #64748b;
    font-weight: 600;
    font-size: 1em;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pagination-summary {
    text-align: center;
    color: #64748b;
    font-size: 0.9em;
    font-weight: 500;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #f0f4f8;
}

.pagination-summary {
    text-align: center;
    color: #777;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-btn {
        min-width: 120px;
        justify-content: center;
    }
}

/* Series Navigation for Single Posts */
.series-navigation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.series-nav-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.series-nav-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #0085a1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
}

.series-nav-text {
    flex: 1;
    min-width: 0;
}

.series-nav-text h4,
.series-nav-text .series-nav-title {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

/* Series List Title Styling (replaces h1 to avoid TOC interference) */
.series-list-title {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    color: #333;
    line-height: 1.2;
}

.series-nav-text p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.series-nav-action {
    flex-shrink: 0;
}

.series-nav-btn {
    background: #0085a1;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.series-nav-btn:hover {
    background: #006b87;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,133,161,0.3);
}

.series-nav-btn:active {
    transform: translateY(0);
}

/* Responsive series navigation */
@media (max-width: 768px) {
    .series-nav-content {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }
    
    .series-nav-icon {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .series-nav-text h4,
    .series-nav-text .series-nav-title {
        font-size: 1em;
    }
    
    .series-nav-text p {
        font-size: 0.85em;
    }
    
    .series-nav-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

.series-modal-header {
    padding: 20px 24px 15px 24px;
    border-bottom: 1px solid #e1e4e8;
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.series-modal-title {
    margin: 0;
    line-height: 1.42857143;
    font-size: 1.5em;
    font-weight: 600;
    color: #24292e;
    flex: 1;
}

.series-modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
}

.series-latest-btn {
    background: linear-gradient(135deg, #0366d6, #0256c7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(3, 102, 214, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.series-latest-btn:hover {
    background: linear-gradient(135deg, #0256c7, #024ea8);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(3, 102, 214, 0.4);
}

.series-latest-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(3, 102, 214, 0.3);
}

.series-latest-btn i {
    font-size: 12px;
}

/* Series Post Title in Modal (replaces h5 to avoid TOC interference) */
.series-post-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.series-modal-close {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: #6a737d;
    text-shadow: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.series-modal-close:hover {
    color: #24292e;
    background-color: #e1e4e8;
}

.series-modal-body {
    position: relative;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 140px); /* Account for header height and padding */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

/* Series Posts Timeline in Modal */
.series-posts-timeline {
    position: relative;
}

.series-post-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.series-post-marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0085a1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Hover effect for the entire post item */
.series-post-item:hover .series-post-marker {
    background-color: #0366d6;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(3, 102, 214, 0.3);
}

.series-post-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 32px;
    width: 2px;
    height: calc(100% + 8px);
    background-color: #ddd;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.series-post-item:hover::after {
    background-color: #0366d6;
}

.series-post-content {
    flex: 1;
    padding-top: 2px;
}

.series-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 12px;
    margin: -12px;
    border-radius: 8px;
    border: 2px solid transparent;
}

.series-post-link:hover {
    background-color: #f1f8ff;
    text-decoration: none;
    color: #0366d6;
    border-color: #e1ecf4;
    box-shadow: 0 2px 8px rgba(3, 102, 214, 0.15);
    transform: translateY(-1px);
}

.series-post-content h5 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.series-post-title {
    color: #333;
    font-weight: 600;
    margin: 0 0 5px 0;
    font-size: 1.1em;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.series-post-latest-tag {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
    animation: pulse-latest 2s infinite;
}

@keyframes pulse-latest {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.5);
    }
}

.series-post-link:hover .series-post-title {
    color: #0366d6;
    font-weight: 700;
}

.series-post-link:hover .series-post-title {
    color: #0085a1;
}

.series-post-content h5 a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.series-post-content h5 a:hover {
    color: #0085a1;
}

.series-post-meta {
    margin: 5px 0;
    font-size: 0.85em;
    color: #777;
    font-weight: 500;
    transition: color 0.3s ease;
}

.series-post-link:hover .series-post-meta {
    color: #0366d6;
}

.series-post-summary {
    margin: 8px 0 0 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.series-post-link:hover .series-post-summary {
    color: #333;
}

/* Body modal-open class */
body.modal-open {
    overflow: hidden;
}

/* Series share button */
.series-share-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.8em;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.series-share-btn:hover {
    background-color: #f0f0f0;
    color: #007acc;
    transform: translateY(-1px);
}

.series-share-btn:active {
    transform: translateY(0);
}

/* Share notification */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 350px;
    font-size: 14px;
}

.share-notification.error {
    background: #dc3545;
}

.share-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-content i {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    margin-bottom: 4px;
}

.notification-text small {
    opacity: 0.9;
    line-height: 1.3;
}

body.modal-open .container:not(.series-popup-modal .container) {
    filter: blur(2px);
    pointer-events: none;
}

/* Ensure modal is not affected by the blur */
body.modal-open .series-popup-modal,
body.modal-open .series-popup-modal * {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #777;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .series-modal-dialog {
        margin: 20px;
        max-width: none;
    }
    
    .series-modal-content {
        max-height: 90vh;
    }
    
    .series-post-item {
        margin-bottom: 40px;
    }
    
    .series-post-marker {
        margin-right: 15px;
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .series-post-item:not(:last-child)::after {
        left: 14px;
        top: 28px;
    }
}

/* Tab switching functionality */
.nav-tabs > li > a[data-toggle="tab"] {
    cursor: pointer;
}

/* Force modal content visibility - added to fix greyout issue */
.series-modal-content,
.series-modal-content *,
.series-modal-dialog,
.series-modal-dialog * {
    filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Most specific modal visibility rules to override any theme conflicts */
body.modal-open .series-popup-modal .series-modal-dialog .series-modal-content,
body.modal-open .series-popup-modal .series-modal-dialog .series-modal-content *,
.modal-backdrop + .series-popup-modal .series-modal-dialog .series-modal-content,
.modal-backdrop + .series-popup-modal .series-modal-dialog .series-modal-content * {
    filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    color: #333 !important;
    background: transparent !important;
    z-index: 9999 !important;
}

/* Override any inherited blur or opacity effects */
.series-popup-modal.show .series-modal-dialog .series-modal-content {
    filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    display: block !important;
}

/* Ensure all modal text is visible */
.series-modal-content h4,
.series-modal-content h5,
.series-modal-content h6,
.series-modal-content p,
.series-modal-content a,
.series-modal-content span,
.series-modal-content div,
.series-modal-content li,
.series-modal-content button {
    color: #333 !important;
    opacity: 1 !important;
    background-color: transparent !important;
}

/* Ensure close button is visible and functional */
.series-modal-content .close,
.series-modal-content .btn-close,
.series-modal-content [data-dismiss="modal"] {
    color: #333 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Modal share button */
.series-share-modal-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.series-share-modal-btn:hover {
    background-color: #f0f0f0;
    color: #007acc;
    transform: translateY(-1px);
}

.series-share-modal-btn:active {
    transform: translateY(0);
}

.series-share-modal-btn:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Sort button for modal */
.series-sort-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
}

.series-sort-btn:hover {
    background-color: #f0f0f0;
    color: #007acc;
    transform: translateY(-1px);
}

.series-sort-btn:active {
    transform: translateY(0);
}

.series-sort-btn:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

.series-sort-btn.sort-asc {
    color: #007acc;
    background-color: #f0f8ff;
}

/* Mobile responsive modal adjustments */
@media (max-width: 768px) {
    .series-modal-dialog {
        margin: 10px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }
    
    .series-modal-content {
        height: 100%;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        margin: 0;
    }
    
    .series-modal-header {
        flex-shrink: 0;
        padding: 15px 20px;
    }
    
    .series-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 0 20px 20px 20px;
        max-height: calc(90vh - 80px); /* Account for header height */
    }
    
    .series-modal-title {
        font-size: 1.1em;
        margin-right: 10px;
    }
    
    .series-modal-controls {
        gap: 5px;
    }
    
    .series-modal-controls button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .series-sort-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .series-latest-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .series-latest-btn i {
        font-size: 10px;
    }
}
