/* epaper-viewer-plugin/css/style.css */
/* Version 1.0.10.1 (incrementing to track CSS specific changes) */

/* Override WordPress theme wrappers for ePaper */
.wp-block-group.has-global-padding.is-layout-constrained,
.wp-block-group.alignfull.has-global-padding.is-layout-constrained,
.entry-content.alignfull.wp-block-post-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* Reset any WordPress spacing variables */
.wp-block-group[style*="margin-top"],
.wp-block-group[style*="padding-top"],
.wp-block-group[style*="padding-bottom"] {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure our viewer container takes full width */
#epaper-viewer-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main Toolbar Styles */
#epaper-fixed-top-toolbar {
    position: fixed;
    top: 195px; /* Mobile header height */
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* When WordPress admin bar is present */
body.admin-bar #epaper-fixed-top-toolbar {
    top: calc(113.6px + 32px); /* Mobile header + WP admin bar height */
}

@media screen and (max-width: 782px) {
    body.admin-bar #epaper-fixed-top-toolbar {
        top: calc(113.6px + 46px); /* Mobile header + mobile WP admin bar height */
    }
}

#epaper-fixed-top-toolbar .toolbar-section-left,
#epaper-fixed-top-toolbar .toolbar-section-center,
#epaper-fixed-top-toolbar .toolbar-section-right { display: flex; align-items: center; gap: 0.5rem; }
#epaper-fixed-top-toolbar .toolbar-section-center { flex-grow: 1; justify-content: center; text-align: center; }
#epaper-fixed-top-toolbar .toolbar-section-right { justify-content: flex-end; }

#epaper-fixed-top-toolbar .button, #epaper-fixed-top-toolbar .button-primary {
  background-color: transparent; color: #333; border: 1px solid transparent;
  padding: 0.4em 0.6em; cursor: pointer; font-size: 0.9em; border-radius: 4px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; white-space: nowrap;
}
#epaper-fixed-top-toolbar .button .dashicons { font-size: 20px; line-height: 1; margin-right: 0; }
#epaper-fixed-top-toolbar .button:hover, #epaper-fixed-top-toolbar .button:focus { background-color: #e9ecef; color: #000; border-color: #ced4da; outline: none; }
#epaper-fixed-top-toolbar #epaper-change-date-btn .dashicons { margin-right: 5px; }
#epaper-fixed-top-toolbar #epaper-change-date-btn .toolbar-button-text { font-size: 0.9em; }
.toolbar-date-display, .toolbar-edition-display, .current-page-info { font-size: 0.9em; color: #555; padding: 0 5px; white-space: nowrap; }
.current-page-info { font-weight: bold; }
#epaper-fixed-top-toolbar #epaper-crop-apply-btn { background-color: #28a745; color: white; border-color: #28a745; }
#epaper-fixed-top-toolbar #epaper-crop-apply-btn:hover { background-color: #218838; border-color: #1e7e34; }
#epaper-fixed-top-toolbar #epaper-crop-cancel-btn { background-color: #dc3545; color: white; border-color: #dc3545; }
#epaper-fixed-top-toolbar #epaper-crop-cancel-btn:hover { background-color: #c82333; border-color: #bd2130; }

.toolbar-crop-share-buttons { display: flex; align-items: center; gap: 5px; padding: 5px 8px; background-color: #e9ecef; border-radius: 4px; margin-left: 10px; border: 1px solid #ced4da; }
.toolbar-crop-share-buttons strong { margin-right: 5px; font-size: 0.9em; white-space: nowrap;}
.toolbar-crop-share-buttons .button { font-size: 0.8em; padding: 0.4em 0.6em; background-color: #fff; color: #333; border-color: #ccc; min-width: 32px; line-height: 1; }
.toolbar-crop-share-buttons .button .dashicons { font-size: 16px; margin: 0; }
.toolbar-crop-share-buttons .button:hover { background-color: #0073aa; color: #fff; border-color: #005a87; }
#copy-link-status { font-size: 0.8em; color: green; vertical-align: middle; font-style: italic; margin-left: 5px; display: none; }

/* Datepicker Popup */
.epaper-datepicker-popup-container { display: none; position: absolute; z-index: 1005; background-color: #fff; border: 1px solid #ccc; box-shadow: 0 3px 8px rgba(0,0,0,0.15); padding: 5px; border-radius: 4px; }

/* Main ePaper Image Display Area */
#epaper-content-area {
    position: relative;
    margin-top: 173.6px; /* 113.6px header + 60px toolbar */
    min-height: calc(100vh - 173.6px);
    padding: 0 !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
    z-index: 1;
}

body.admin-bar #epaper-content-area {
    margin-top: calc(173.6px + 32px);
    min-height: calc(100vh - 173.6px - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar #epaper-content-area {
        margin-top: calc(173.6px + 46px);
        min-height: calc(100vh - 173.6px - 46px);
    }
}

#epaper-page-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
    margin: 0;
    padding: 0;
}

.epaper-page-display {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: none;
}

.epaper-page-display img#current-epaper-image {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    cursor: default;
    padding: 0;
    transform-origin: center center;
}

/* Remove the admin bar specific height constraints */
body.admin-bar .epaper-page-display img#current-epaper-image {
    max-height: none;
}

@media screen and (max-width: 782px) { 
    body.admin-bar .epaper-page-display img#current-epaper-image { 
        max-height: none;
    } 
}

.epaper-page-display img#current-epaper-image.cropper-hidden { display: none; }
.epaper-no-page-message { margin-top: 20px; font-size: 1.1em; color: #777; text-align:center; padding: 20px; }

/* Side Page Navigation Arrows */
.epaper-side-nav-btn { position: fixed; top: 50%; transform: translateY(-50%); z-index: 1000; background-color: rgba(0,0,0,0.4); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s ease; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.epaper-side-nav-btn .dashicons { font-size: 28px; line-height: 1; }
.epaper-side-nav-btn:hover { background-color: rgba(0,0,0,0.7); }
.epaper-side-nav-btn.disabled, .epaper-side-nav-btn.disabled-js { opacity: 0.3; cursor: default; pointer-events: none; background-color: rgba(0,0,0,0.2); }
#epaper-prev-page.epaper-side-nav-btn { left: 15px; }
#epaper-next-page.epaper-side-nav-btn { right: 15px; }

/* Loading Indicator */
#epaper-loading-indicator { font-style: italic; color: #333; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,0.95); padding: 15px 25px; border-radius: 5px; z-index: 10005; border: 1px solid #ddd; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }

/* Styles for OLD Swiper-based Thumbnail Strip at the bottom (kept for completeness if ever reactivated) */
#epaper-thumbnail-strip-container { position: fixed; bottom: -200px; /* Initially hidden */ left: 0; width: 100%; z-index: 1001; background-color: rgba(240,240,240,0.95); padding: 5px 0; border-top: 1px solid #ccc; box-shadow: 0 -2px 8px rgba(0,0,0,0.15); transition: transform 0.3s ease-in-out, bottom 0.3s ease-in-out; }
#epaper-thumbnail-strip-container[aria-hidden="false"] { transform: translateY(0); bottom: 0; }
#epaper-thumbnail-strip-container .epaper-thumbnails.swiper { position: relative; width: 100%; height: 100px; padding: 0 40px; box-sizing: border-box; }
#epaper-thumbnail-strip-container .epaper-thumbnail-slide { width: 70px; height: 80px; border: 2px solid transparent; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
#epaper-thumbnail-strip-container .epaper-thumbnail-slide.active { border-color: #0073aa; }
#epaper-thumbnail-strip-container .epaper-thumbnail-image { width:100%; max-height: 55px; object-fit: cover; display: block; border: 1px solid #ddd; }
#epaper-thumbnail-strip-container .epaper-thumbnail-label { font-size: 0.65rem; color: #444; text-align: center; padding-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
#epaper-thumbnail-strip-container .swiper-button-prev, #epaper-thumbnail-strip-container .swiper-button-next { color: #0073aa; width: 28px; height: 28px; background-color: rgba(255,255,255,0.8); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: background-color 0.2s ease, color 0.2s ease; top: 50%; transform: translateY(-50%); }
#epaper-thumbnail-strip-container .swiper-button-prev:hover, #epaper-thumbnail-strip-container .swiper-button-next:hover { background-color: #0073aa; color: #fff; }
#epaper-thumbnail-strip-container .swiper-button-prev::after, #epaper-thumbnail-strip-container .swiper-button-next::after { font-size: 14px; font-weight: bold; }
#epaper-thumbnail-strip-container .swiper-button-prev { left: 5px; }
#epaper-thumbnail-strip-container .swiper-button-next { right: 5px; }


/* Styles for NEW Full-Width Page Grid View ("List All Pages") */
.epaper-page-grid-overlay {
    position: fixed;
    top: 173.6px; /* 113.6px header + 60px toolbar */
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 173.6px);
    background-color: rgba(230, 230, 230, 0.99);
    z-index: 99;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0;
    display: none;
    flex-direction: column;
}

.epaper-page-grid-overlay .epaper-page-grid-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f0ad4e;
    color: #222;
    border-bottom: 1px solid #eea236;
}

#epaper-page-grid-view-container {
    padding-top: 173.6px; /* Match the main content area spacing */
}

body.admin-bar #epaper-page-grid-view-container {
    padding-top: calc(173.6px + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar #epaper-page-grid-view-container {
        padding-top: calc(173.6px + 46px);
    }
}

body.admin-bar .epaper-page-grid-overlay {
    top: calc(173.6px + 32px);
    height: calc(100vh - 173.6px - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .epaper-page-grid-overlay {
        top: calc(173.6px + 46px);
        height: calc(100vh - 173.6px - 46px);
    }
}

.epaper-page-grid-overlay .epaper-page-grid-header h3 { margin: 0; font-size: 1.2em; font-weight: bold; text-transform: uppercase; }
.epaper-page-grid-overlay #epaper-close-grid-view-btn.button { background-color: transparent; border: none; padding: 5px; line-height: 1;}
.epaper-page-grid-overlay #epaper-close-grid-view-btn.button .dashicons { font-size: 28px; color: #333; }
.epaper-page-grid-overlay #epaper-close-grid-view-btn.button:hover .dashicons { color: #000; }

/* Body class when grid is active */
body.epaper-grid-view-active #epaper-content-area,
body.epaper-grid-view-active #epaper-ajax-pagination { display: none !important; }
body.epaper-grid-view-active #epaper-fixed-top-toolbar #epaper-list-all-pages-btn { background-color: #f0ad4e; color: #333; border-color: #eea236; }
body.epaper-grid-view-active #epaper-fixed-top-toolbar #epaper-list-all-pages-btn:hover { background-color: #eea236; }

#epaper-page-grid-view-container #epaper-page-grid-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px; padding: 20px; }
#epaper-page-grid-view-container .epaper-grid-thumbnail-item { background-color: #fff; border: 1px solid #bbb; border-radius: 2px; text-align: center; cursor: pointer; transition: transform 0.15s ease-out, box-shadow 0.15s ease-out; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
#epaper-page-grid-view-container .epaper-grid-thumbnail-item:hover { transform: scale(1.03); box-shadow: 0 5px 15px rgba(0,0,0,0.15); z-index: 5; }
#epaper-page-grid-view-container .epaper-grid-thumbnail-item img { width: 100%; height: auto; aspect-ratio: 0.707; object-fit: cover; display: block; border-bottom: 1px solid #ddd; background-color: #fdfdfd; /* Light background for image area within thumbnail */ }
#epaper-page-grid-view-container .epaper-grid-thumbnail-item .epaper-grid-page-number { display: flex; align-items: center; justify-content: center; font-size: 0.85em; padding: 6px 5px; color: #444; background-color: #f0f0f0; border-top: 1px solid #ddd;}
#epaper-page-grid-view-container .epaper-grid-thumbnail-item .epaper-grid-page-number .page-num-badge { background-color: #337ab7; color: white; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8em; margin-right: 6px; line-height: 1; }

/* Responsive for NEW Grid */
@media (max-width: 992px) { #epaper-page-grid-view-container #epaper-page-grid-content { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; padding: 15px; } }
@media (max-width: 768px) { #epaper-page-grid-view-container #epaper-page-grid-content { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; padding: 12px; } }
@media (max-width: 480px) {
    .epaper-page-grid-overlay { top: 46px; height: calc(100vh - 46px); } /* Adjust for smaller toolbar height */
    body.admin-bar .epaper-page-grid-overlay { top: calc(46px + 46px); height: calc(100vh - 46px - 46px); }
    .epaper-page-grid-overlay .epaper-page-grid-header { padding: 8px 15px; }
    .epaper-page-grid-overlay .epaper-page-grid-header h3 { font-size: 1.1em; }
    #epaper-page-grid-view-container #epaper-page-grid-content { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 10px; padding: 10px; }
    #epaper-page-grid-view-container .epaper-grid-thumbnail-item .epaper-grid-page-number { font-size: 0.8em; padding: 5px 4px;}
    #epaper-page-grid-view-container .epaper-grid-thumbnail-item .epaper-grid-page-number .page-num-badge { width: 20px; height: 20px; font-size: 0.75em; }
}


/* Share Popups & Modals & Crop Specific (largely unchanged) */
.share-page-button-wrapper { position: relative; }
.epaper-share-options-popup { position: absolute; background: #fff; border: 1px solid #ccc; padding: 0.75rem; border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,0.15); z-index: 1005; min-width: auto; display: flex; flex-direction: column; gap: 0.5rem; top: 100%; right: 0; left: auto; margin-top: 5px; }
#epaper-crop-preview-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.85); z-index: 10010; display: none; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
#epaper-crop-preview-modal > div { background:white; padding:25px; border-radius:5px; max-width:90vw; max-height:90vh; overflow:auto; box-shadow: 0 5px 15px rgba(0,0,0,0.3); text-align:center; display: flex; flex-direction: column; }
#epaper-cropped-preview-image { max-width:100%; max-height:calc(90vh - 220px); margin-bottom:20px; border:1px solid #ccc; display:block; margin-left:auto; margin-right:auto; object-fit: contain; }
.epaper-modal-share-buttons { margin-top: 15px; padding-top:15px; border-top: 1px solid #eee; text-align: center; }
.epaper-modal-share-buttons strong { display: block; margin-bottom: 0.8rem; font-size: 0.9em; }
.epaper-modal-share-icons { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
#epaper-close-preview-btn { background-color: #d32f2f; color: #fff; border: none; padding: 0.7em 1.5em; cursor: pointer; font-size: 0.9em; border-radius: 4px; transition: background-color 0.2s ease; margin-top: 20px; align-self: center; }
#epaper-close-preview-btn:hover, #epaper-close-preview-btn:focus { background-color: #b71c1c; outline: none; }
.epaper-share-options-popup button, .epaper-modal-share-icons button { margin: 0; padding: 0.5em 0.7em; font-size: 0.9em; cursor: pointer; border: 1px solid #ccc; background: #f7f7f7; color: #333; border-radius: 3px; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; text-align: center; width: auto; min-width: 38px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.epaper-share-options-popup button .dashicons, .epaper-modal-share-icons button .dashicons { font-size: 18px; line-height: 1; margin: 0; }
.epaper-share-options-popup button:hover, .epaper-share-options-popup button:focus, .epaper-modal-share-icons button:hover, .epaper-modal-share-icons button:focus { background-color: #0073aa; color: #fff; border-color: #005a87; outline: none; }
.copy-link-temp-status { font-size: 0.9em; color: green !important; font-style: italic; margin-left: 8px; display: inline-block; background-color: transparent !important; border: none !important; }

/* Fullscreen Mode (Browser native) */
body.epaper-fullscreen-active { overflow: hidden !important; }
body.epaper-fullscreen-active #epaper-fixed-top-toolbar { background-color: #343a40; color: #f8f9fa; border-bottom-color: #495057; top: 0 !important; }
body.epaper-fullscreen-active #epaper-fixed-top-toolbar .button { color: #f8f9fa; }
body.epaper-fullscreen-active #epaper-fixed-top-toolbar .button:hover { background-color: #495057; border-color: #6c757d; }
body.epaper-fullscreen-active .toolbar-date-display, body.epaper-fullscreen-active .toolbar-edition-display, body.epaper-fullscreen-active .current-page-info, body.epaper-fullscreen-active #epaper-fixed-top-toolbar #epaper-change-date-btn .toolbar-button-text { color: #e9ecef; }
body.epaper-fullscreen-active #wpadminbar, body.epaper-fullscreen-active header#masthead, body.epaper-fullscreen-active footer#colophon, body.epaper-fullscreen-active .site-header, body.epaper-fullscreen-active .site-footer, body.epaper-fullscreen-active .breadcrumb-area { display: none !important; }
body.epaper-fullscreen-active #epaper-content-area { margin-top: 50px !important; height: calc(100vh - 50px) !important; padding: 0; } /* Should already be set by fullscreen toggle JS too */
body.epaper-fullscreen-active .epaper-page-display img#current-epaper-image { 
    max-height: none !important; /* Remove height constraint in fullscreen */
}

/* Styles for [epaper_editions_showcase] Shortcode (Scoped) */
.epaper-editions-showcase { max-width: 100%; margin: 20px 0; font-family: inherit; }
.epaper-editions-showcase .edition-showcase-section { margin-bottom: 40px; }
.epaper-editions-showcase .edition-showcase-title { font-size: 18px; font-weight: bold; color: #003366; text-transform: uppercase; margin-bottom: 15px; padding-bottom: 5px; }
.epaper-editions-showcase .edition-showcase-row { display: flex; flex-wrap: nowrap; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.epaper-editions-showcase .evp-showcase-item { background-color: #ffffff; border: 1px solid #cccccc; border-radius: 0; overflow: hidden; text-align: center; box-sizing: border-box; display: flex; flex-direction: column; width: 150px; flex-shrink: 0; transition: box-shadow 0.2s ease; }
.epaper-editions-showcase .evp-showcase-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.epaper-editions-showcase .evp-showcase-item-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.epaper-editions-showcase .evp-showcase-item-image { width: 100%; height: 200px; object-fit: cover; display: block; background-color: #f0f0f0; }
.epaper-editions-showcase .evp-showcase-no-thumbnail-placeholder { width: 100%; height: 200px; background-color: #e9ecef; display: flex; align-items: center; justify-content: center; padding: 10px; box-sizing: border-box; }
.epaper-editions-showcase .evp-showcase-no-thumbnail-placeholder span { color: #6c757d; font-size: 0.85em; font-weight: 500; }
.epaper-editions-showcase .evp-showcase-item-title { font-size: 13px; font-weight: bold; color: #333333; background-color: #ffcc00; padding: 8px 5px; margin: 0; line-height: 1.2; white-space: normal; min-height: 3em; display: flex; align-items: center; justify-content: center; }
.epaper-editions-showcase .edition-showcase-swiper.swiper { position: relative; padding-left: 5px; padding-right: 5px; margin-left: -5px; margin-right: -5px; }
.epaper-editions-showcase .edition-showcase-swiper .swiper-slide { width: 150px; /* Match .evp-showcase-item */ height: auto; box-sizing: border-box; display: flex; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 50px; background-color: rgba(60, 60, 60, 0.5); color: white; border-radius: 3px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background-color 0.2s ease; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev:hover, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next:hover { background-color: rgba(30, 30, 30, 0.7); }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev { left: 8px; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next { right: 8px; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev::after, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next::after { font-family: dashicons; font-size: 22px; font-weight: normal; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev::after { content: "\f341"; }
.epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next::after { content: "\f345"; }
.epaper-editions-showcase .edition-showcase-swiper .swiper-button-disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.epaper-editions-showcase .no-child-editions-message { padding: 15px; background-color: #f9f9f9; border: 1px dashed #ddd; border-radius: 4px; color: #555; text-align: center; font-style: italic; }
@media (max-width: 768px) { .epaper-editions-showcase .evp-showcase-item, .epaper-editions-showcase .edition-showcase-swiper .swiper-slide { width: 130px; } .epaper-editions-showcase .evp-showcase-item-image, .epaper-editions-showcase .evp-showcase-no-thumbnail-placeholder { height: 170px; } .epaper-editions-showcase .edition-showcase-title { font-size: 16px; } }
@media (max-width: 480px) { .epaper-editions-showcase .evp-showcase-item, .epaper-editions-showcase .edition-showcase-swiper .swiper-slide { width: 110px; } .epaper-editions-showcase .evp-showcase-item-image, .epaper-editions-showcase .evp-showcase-no-thumbnail-placeholder { height: 145px; } .epaper-editions-showcase .evp-showcase-item-title { font-size: 12px; min-height: 2.5em; } .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next { width: 28px; height: 45px; } .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev::after, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next::after { font-size: 20px; } }


/* Other Shortcode Container Styles (Archive, Today, By Edition, Single Publication, All Publications grid) */
/* ... (Ensure these remain as they were in your combined version 1.0.9 CSS) ... */
.epaper-archive-container.sakshi-style-archive { max-width: 1200px; margin: 20px auto; padding: 0 15px; }
.epaper-archive-date-filter { display: flex; align-items: center; gap: 15px; padding: 15px; background-color: #f0f2f5; border-radius: 6px; margin-bottom: 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.epaper-archive-date-filter label { font-weight: 600; font-size: 1.1em; color: #333; }
.epaper-archive-date-filter input[type="date"] { padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; min-width: 180px; }
.epaper-archive-date-filter input[type="submit"] { background-color: #0073aa; color: white; border: none; padding: 10px 20px; font-size: 1em; font-weight: 500; border-radius: 4px; cursor: pointer; transition: background-color 0.2s ease; }
.epaper-archive-date-filter input[type="submit"]:hover { background-color: #005a87; }
.epaper-archive-container.sakshi-style-archive .edition-section { margin-bottom: 40px; }
.epaper-archive-container.sakshi-style-archive .edition-section-title { font-size: 1.6em; color: #2c3e50; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #e0e0e0; text-transform: uppercase; letter-spacing: 0.5px; }
.epaper-archive-container.sakshi-style-archive .edition-section-empty .no-publications-message { background-color: #f9f9f9; padding: 15px; border-radius: 4px; color: #555; text-align: center; border: 1px dashed #ddd; }
.epaper-archive-container.sakshi-style-archive .evp-archive-publication-slide { width: 160px; background-color: #fff; border-radius: 4px; overflow: hidden; text-align: center; border: 1px solid #ddd; transition: box-shadow 0.2s ease; height: auto; display: flex; flex-direction: column; }
.epaper-archive-container.sakshi-style-archive .evp-archive-publication-slide:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.epaper-archive-container.sakshi-style-archive .evp-archive-slide-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; }
.epaper-archive-container.sakshi-style-archive .evp-archive-slide-image { width: 100%; height: 210px; object-fit: cover; display: block; }
.epaper-archive-container.sakshi-style-archive .evp-archive-no-thumbnail-placeholder { width: 100%; height: 210px; background-color: #e9ecef; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 10px; box-sizing: border-box; }
.epaper-archive-container.sakshi-style-archive .evp-archive-no-thumbnail-placeholder span { color: #6c757d; font-size: 0.85em; font-weight: 500; text-align: center; }
.epaper-archive-container.sakshi-style-archive .evp-archive-slide-title { font-size: 0.9em; font-weight: 500; color: #333; padding: 10px 8px; margin: 0; line-height: 1.3; white-space: normal; min-height: 3em; display: flex; align-items: center; justify-content: center; flex-grow: 1; }
.epaper-archive-container.sakshi-style-archive .swiper-button-prev, .epaper-archive-container.sakshi-style-archive .swiper-button-next { color: #333; width: 36px; height: 36px; background-color: rgba(255,255,255,0.9); border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.15); top: 50%; transform: translateY(-50%); transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease; opacity: 0.8; z-index: 10; }
.epaper-archive-container.sakshi-style-archive .swiper-button-prev:hover, .epaper-archive-container.sakshi-style-archive .swiper-button-next:hover { background-color: #fff; color: #000; opacity: 1; }
.epaper-archive-container.sakshi-style-archive .swiper-button-prev.swiper-button-disabled, .epaper-archive-container.sakshi-style-archive .swiper-button-next.swiper-button-disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.epaper-archive-container.sakshi-style-archive .swiper-button-prev::after, .epaper-archive-container.sakshi-style-archive .swiper-button-next::after { font-size: 18px; font-weight: bold; }
.epaper-archive-container.sakshi-style-archive .swiper-button-prev { left: 10px; }
.epaper-archive-container.sakshi-style-archive .swiper-button-next { right: 10px; }

/* General Publication Swiper (Today, By Edition) */
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) { padding-left: 40px; padding-right: 40px; margin-bottom: 20px; box-sizing: border-box; position: relative; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide { border: 1px solid #e0e0e0; border-radius: 4px; padding: 15px; background-color: #fff; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; flex-direction: column; height: auto; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide img { max-width: 100%; height: 150px; object-fit: cover; margin-bottom: 10px; border-radius: 3px; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-no-thumbnail-placeholder { width:100%; height:150px; background-color:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#aaa; margin-bottom:10px;font-size:0.9em; border-radius: 3px; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide h3 { font-size: 1.1em; margin-top: 0; margin-bottom: 0.5em; color: #333; min-height: 2.4em; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide p { font-size: 0.85em; color: #777; margin-bottom: 1em; flex-grow: 1; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide .evp-viewer-link { display: inline-block; padding: 0.5em 1em; background-color: #555; color: #fff; text-decoration: none; border-radius: 3px; font-size: 0.85em; transition: background-color 0.2s ease; }
.evp-publications-swiper-container.swiper:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .evp-publication-slide .evp-viewer-link:hover { background-color: #333; }
.evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-prev, .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-next { color: #0073aa; width: 30px; height: 30px; background-color: rgba(255,255,255,0.9); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.2); top: 50%; transform: translateY(-50%); }
.evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-prev::after, .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-next::after { font-size: 16px; font-weight: bold; }
.evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-prev { left: 0px; }
.evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-next { right: 0px; }

.evp-publication-single { border: 1px solid #e0e0e0; padding: 15px; border-radius: 4px; background-color: #f9f9f9; margin-bottom: 20px; max-width: 300px; }
.evp-publication-single img { max-width: 100%; height: auto; margin-bottom: 10px; border-radius: 3px; }
.evp-publication-single h3 { margin-top: 0; font-size: 1.2em; } .evp-publication-single h3 a { text-decoration: none; color: #333; } .evp-publication-single h3 a:hover { color: #0073aa; } .evp-publication-single p { font-size: 0.9em; color: #555; margin-bottom: 10px; } .evp-publication-single .evp-viewer-link { display: inline-block; padding: 0.6em 1.2em; background-color: #0073aa; color: #fff; text-decoration: none; border-radius: 3px; font-size: 0.9em; transition: background-color 0.2s ease; } .evp-publication-single .evp-viewer-link:hover { background-color: #005a87; }
.epaper-crop-display-view { text-align: center; padding: 20px 15px; background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 5px; margin-top: 20px; }
.epaper-crop-display-view h2 { font-size: 1.6em; margin-top: 0; margin-bottom: 1.5rem; color: #333; } .epaper-crop-image-wrapper { margin-bottom: 1.5rem; display: inline-block; padding: 5px; background-color: #fff; border: 1px solid #ccc; border-radius: 4px; } .epaper-crop-image-wrapper img { max-width: 100%; height: auto; display: block; border-radius: 2px; } .epaper-go-to-full-page-btn.button, a.epaper-go-to-full-page-btn { display: inline-block; background-color: #0073aa; color: #fff; padding: 12px 25px; text-decoration: none; border-radius: 4px; font-weight: bold; font-size: 1em; transition: background-color 0.2s ease; border: none; } .epaper-go-to-full-page-btn.button:hover, .epaper-go-to-full-page-btn.button:focus, a.epaper-go-to-full-page-btn:hover, a.epaper-go-to-full-page-btn:focus { background-color: #005a87; color: #fff; outline: none; }
.epaper-all-publications-archive { margin-top: 20px; margin-bottom: 30px; } .epaper-publications-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; } .epaper-publication-card { background-color: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out; } .epaper-publication-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); } .epaper-publication-card-thumbnail-link { display: block; position: relative; } .epaper-publication-card-thumbnail { width: 100%; height: 220px; object-fit: cover; display: block; border-bottom: 1px solid #eee; } .epaper-publication-card-no-thumb { width: 100%; height: 220px; background-color: #f0f2f5; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #e0e0e0; } .epaper-publication-card-no-thumb span { color: #a0a0a0; font-size: 0.9em; font-style: italic; } .epaper-publication-card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; text-align: left; } .epaper-publication-card-title { font-size: 1.25em; font-weight: 600; margin-top: 0; margin-bottom: 10px; line-height: 1.3; } .epaper-publication-card-title a { text-decoration: none; color: #333; transition: color 0.2s ease; } .epaper-publication-card-title a:hover { color: #0073aa; } .epaper-publication-card-date { font-size: 0.85em; color: #777; margin-bottom: 15px; flex-grow: 1; } .epaper-publication-card-view-button { display: inline-block; background-color: #0073aa; color: #fff; padding: 10px 18px; text-decoration: none; border-radius: 5px; font-weight: 500; font-size: 0.9em; text-align: center; transition: background-color 0.2s ease, transform 0.1s ease; align-self: flex-start; } .epaper-publication-card-view-button:hover { background-color: #005a87; transform: translateY(-1px); }
.epaper-pagination-nav { margin-top: 40px; margin-bottom: 20px; text-align: center; } .epaper-pagination-nav ul { list-style: none; padding: 0; margin: 0; display: inline-block; } .epaper-pagination-nav li { display: inline; margin: 0 2px; } .epaper-pagination-nav .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid #ddd; background-color: #fff; color: #0073aa; text-decoration: none; border-radius: 4px; font-size: 0.95em; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; } .epaper-pagination-nav .page-numbers:hover, .epaper-pagination-nav .page-numbers:focus { background-color: #f0f5fa; border-color: #0073aa; color: #005a87; } .epaper-pagination-nav .page-numbers.current { background-color: #0073aa; border-color: #0073aa; color: #fff; font-weight: bold; cursor: default; } .epaper-pagination-nav .page-numbers.dots { border: none; background: transparent; color: #777; cursor: default; padding: 8px 6px; }

/* General Responsive (Combined from your old responsive rules, may need tweaks for new layouts) */
@media (max-width: 782px) { #epaper-fixed-top-toolbar { padding: 5px 8px; min-height: 46px; gap: 0.2rem; } #epaper-fixed-top-toolbar .button .dashicons { font-size: 18px; } #epaper-fixed-top-toolbar .toolbar-button-text { display: none; } #epaper-fixed-top-toolbar #epaper-change-date-btn .toolbar-button-text { display: inline-block; font-size: 0.8em; } .toolbar-date-display, .toolbar-edition-display { font-size: 0.8em; } .current-page-info { font-size: 0.85em; } .epaper-side-nav-btn { width: 35px; height: 35px; } .epaper-side-nav-btn .dashicons { font-size: 22px; } #epaper-prev-page.epaper-side-nav-btn { left: 5px; } #epaper-next-page.epaper-side-nav-btn { right: 5px; }
    .epaper-archive-container.sakshi-style-archive .evp-archive-publication-slide { width: 140px; } .epaper-archive-container.sakshi-style-archive .evp-archive-slide-image, .epaper-archive-container.sakshi-style-archive .evp-archive-no-thumbnail-placeholder { height: 185px; } .epaper-archive-container.sakshi-style-archive .edition-section-title { font-size: 1.4em; } .epaper-archive-container.sakshi-style-archive .epaper-archive-date-filter { flex-direction: column; align-items: stretch; } .epaper-archive-container.sakshi-style-archive .epaper-archive-date-filter input[type="date"], .epaper-archive-container.sakshi-style-archive .epaper-archive-date-filter input[type="submit"] { width: 100%; box-sizing: border-box; } .epaper-archive-container.sakshi-style-archive .swiper-button-prev { left: -10px; } .epaper-archive-container.sakshi-style-archive .swiper-button-next { right: -10px; }
    .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) { padding: 10px 30px; } .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-prev, .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-next { width: 26px; height: 26px; } .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-prev::after, .evp-publications-swiper-container:not(.epaper-archive-container .evp-publications-swiper-container):not(.edition-showcase-swiper) .swiper-button-next::after { font-size: 13px; }
    .epaper-editions-showcase .evp-showcase-item, .epaper-editions-showcase .edition-showcase-swiper .swiper-slide { width: 130px; } .epaper-editions-showcase .evp-showcase-item-image, .epaper-editions-showcase .evp-showcase-no-thumbnail-placeholder { height: 170px; } .epaper-editions-showcase .edition-showcase-title { font-size: 16px; }
    .epaper-crop-display-view h2 { font-size: 1.3em; } a.epaper-go-to-full-page-btn { padding: 10px 20px; font-size: 0.9em; } .epaper-share-options-popup button .dashicons, .epaper-modal-share-icons button .dashicons { font-size: 16px; } .epaper-share-options-popup button, .epaper-modal-share-icons button { padding: 0.4em 0.6em; min-width: 32px; } #epaper-cropped-preview-image { max-height:calc(90vh - 200px); }
}
@media (max-width: 600px) { #epaper-fixed-top-toolbar .toolbar-section-center { display: none; } #epaper-fixed-top-toolbar .toolbar-section-left, #epaper-fixed-top-toolbar .toolbar-section-right { flex-basis: 50%; } #epaper-fixed-top-toolbar #epaper-change-date-btn .toolbar-button-text { display: none; } .epaper-publications-grid { grid-template-columns: 1fr; gap: 20px; } .epaper-publication-card-thumbnail, .epaper-publication-card-no-thumb { height: 180px; } .epaper-publication-card-title { font-size: 1.1em; }
}
@media (max-width: 480px) { #epaper-fixed-top-toolbar { flex-wrap: wrap; padding-bottom: 5px; min-height: auto; } #epaper-fixed-top-toolbar .toolbar-section-left, #epaper-fixed-top-toolbar .toolbar-section-right { flex-basis: 100%; justify-content: space-around; margin-bottom: 5px; gap: 0.3rem; } #epaper-fixed-top-toolbar .toolbar-section-center { flex-basis: 100%; text-align: center; display: block; margin-bottom: 5px; order: -1; } #epaper-fixed-top-toolbar .button .dashicons { font-size: 16px; } #epaper-fixed-top-toolbar #epaper-change-date-btn .dashicons { margin-right: 0; }
    .toolbar-crop-share-buttons { flex-direction: row; flex-wrap: wrap; justify-content: center; position: static; width: 100%; margin-top: 5px; padding: 5px; background: transparent; border: none; box-shadow: none; } .toolbar-crop-share-buttons .button { font-size: 0.75em; } .toolbar-crop-share-buttons .button .dashicons { font-size: 15px; }
    #epaper-thumbnail-strip-container .epaper-thumbnails.swiper { height: 90px; padding: 0 25px; } #epaper-thumbnail-strip-container .epaper-thumbnail-slide { width: 60px; height: 70px; } #epaper-thumbnail-strip-container .epaper-thumbnail-image { max-height: 45px; } #epaper-thumbnail-strip-container .epaper-thumbnail-label { font-size: 0.6rem; }
    .epaper-share-options-popup { min-width: auto; padding: 0.5rem; flex-direction: row; flex-wrap: wrap; justify-content: center; } .epaper-share-options-popup button { font-size: 0.8em; } .epaper-share-options-popup button .dashicons { font-size: 16px; }
    .epaper-crop-display-view { margin: 10px auto; } .epaper-crop-display-view h2 { font-size: 1.2em; margin-bottom: 1rem; }
    .epaper-archive-container.sakshi-style-archive .evp-archive-publication-slide { width: 120px; } .epaper-archive-container.sakshi-style-archive .evp-archive-slide-image, .epaper-archive-container.sakshi-style-archive .evp-archive-no-thumbnail-placeholder { height: 160px; } .epaper-archive-container.sakshi-style-archive .evp-archive-slide-title { font-size: 0.8em; padding: 8px 5px; } .epaper-archive-container.sakshi-style-archive .edition-section-title { font-size: 1.25em; } .epaper-archive-container.sakshi-style-archive .swiper-button-prev, .epaper-archive-container.sakshi-style-archive .swiper-button-next { width: 30px; height: 30px; } .epaper-archive-container.sakshi-style-archive .swiper-button-prev::after, .epaper-archive-container.sakshi-style-archive .swiper-button-next::after { font-size: 15px; } .epaper-archive-container.sakshi-style-archive .swiper-button-prev { left: 0px; } .epaper-archive-container.sakshi-style-archive .swiper-button-next { right: 0px; }
    .epaper-editions-showcase .evp-showcase-item, .epaper-editions-showcase .edition-showcase-swiper .swiper-slide { width: 110px; } .epaper-editions-showcase .evp-showcase-item-title { font-size: 12px; min-height: 2.5em; } .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next { width: 28px; height: 45px; } .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-prev::after, .epaper-editions-showcase .edition-showcase-swiper .evp-swiper-nav-next::after { font-size: 20px; }
    #epaper-cropped-preview-image { max-height:calc(85vh - 180px); } .epaper-modal-share-icons { gap: 0.3rem; } .epaper-modal-share-icons button .dashicons { font-size: 15px; } .epaper-modal-share-icons button { padding: 0.3em 0.5em; min-width: 30px; }
}


/* style.css */

#epaper-fixed-top-toolbar #epaper-home-btn.epaper-icon-button {
    /* order: -1; */ /* If you want it to be the very first item in toolbar-section-left */
    /* margin-right: 5px; */ /* Optional extra spacing */
}

#epaper-fixed-top-toolbar #epaper-home-btn.epaper-icon-button .dashicons {
    font-size: 20px; /* Or your preferred size for home icon */
}

/* Edition Switcher Styles */
.epaper-edition-switcher {
    position: relative;
    display: inline-block;
}

.epaper-dropdown-menu {
    position: fixed;
    z-index: 2000;
    background: none;
    border: none;
    box-shadow: none;
    min-width: 220px;
    padding: 0;
    margin-top: 0;
    left: 0; /* Will be set by JS */
    top: 0;  /* Will be set by JS */
}

.epaper-dropdown-parent-group {
    margin-bottom: 2px;
}

.epaper-dropdown-parent-btn {
    width: 100%;
    background: #002366;
    color: #fff;
    border: none;
    text-align: left;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    transition: background 0.2s;
    letter-spacing: 0.5px;
}

.epaper-dropdown-parent-btn:hover,
.epaper-dropdown-parent-group.open > .epaper-dropdown-parent-btn {
    background: #00194d;
}

.epaper-dropdown-parent-btn .edition-toggle-icon {
    font-size: 22px;
    font-weight: bold;
    margin-left: 10px;
    line-height: 1;
}

.epaper-dropdown-child-menu {
    background: #fff;
    margin: 0;
    padding: 0 0 0 0;
    border: none;
    box-shadow: none;
    border-left: none;
}

.epaper-dropdown-child-menu .epaper-dropdown-item {
    display: block;
    padding: 12px 16px 12px 32px;
    font-size: 17px;
    color: #333;
    background: #fff;
    border: none;
    border-radius: 0;
    margin: 0;
    font-weight: normal;
    letter-spacing: 0.2px;
    transition: background 0.2s, color 0.2s;
}

.epaper-dropdown-child-menu .epaper-dropdown-item.active {
    color: #d90000;
    font-weight: bold;
    background: #fff;
}

.epaper-dropdown-child-menu .epaper-dropdown-item:hover {
    background: #f2f2f2;
    color: #002366;
}

/* Remove border and radius from all dropdown items */
.epaper-dropdown-item,
.epaper-dropdown-parent-btn {
    border-radius: 0 !important;
    border: none !important;
}

/* Fullscreen mode adjustments */
body.epaper-fullscreen-active .epaper-dropdown-menu {
    background-color: #343a40;
    border-color: #495057;
}

body.epaper-fullscreen-active .epaper-dropdown-item {
    color: #f8f9fa;
}

body.epaper-fullscreen-active .epaper-dropdown-item:hover {
    background-color: #495057;
}

body.epaper-fullscreen-active .epaper-dropdown-item.active {
    background-color: #6c757d;
}

/* Parent/Child Edition Dropdown Styles */
.epaper-dropdown-parent-group {
    position: relative;
}
.epaper-dropdown-parent-btn {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 15px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}
.epaper-dropdown-parent-btn:hover,
.epaper-dropdown-parent-group.active-parent > .epaper-dropdown-parent-btn {
    background-color: #f8f9fa;
    font-weight: bold;
}
.epaper-dropdown-child-menu {
    display: none;
    position: static;
    background: #fff;
    border: none;
    box-shadow: none;
    margin-left: 15px;
    padding-left: 10px;
    border-left: 2px solid #e9ecef;
}
.epaper-dropdown-parent-group.open > .epaper-dropdown-child-menu {
    display: block;
}
.epaper-dropdown-child-menu .epaper-dropdown-item {
    padding-left: 20px;
    font-size: 15px;
}

/* --- Edition Modal Styles --- */
.epaper-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 24, 64, 0.65);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.epaper-modal-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    min-width: 350px;
    max-width: 420px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: epaperModalFadeIn 0.2s;
}
@keyframes epaperModalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
.epaper-modal-header {
    background: #002366;
    color: #fff;
    padding: 22px 28px 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    border-bottom: 1px solid #e9ecef;
}
.epaper-modal-title {
    flex: 1;
    text-align: center;
    font-size: 1.35em;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.epaper-modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.1em;
    font-weight: bold;
    cursor: pointer;
    margin-left: 18px;
    margin-right: -8px;
    line-height: 1;
    transition: color 0.2s;
}
.epaper-modal-close-btn:hover {
    color: #ff3b3b;
}

/* Modal edition list tweaks */
.epaper-modal-box .epaper-dropdown-menu {
    position: static !important;
    background: none;
    box-shadow: none;
    border: none;
    min-width: 100%;
    margin: 0;
    padding: 0;
}

@media (max-width: 600px) {
    .epaper-modal-box {
        min-width: 0;
        max-width: 98vw;
    }
    .epaper-modal-header {
        padding: 16px 10px 12px 10px;
        font-size: 1.1em;
    }
    .epaper-modal-title {
        font-size: 1.1em;
    }
}

/* --- Editions Section in Modal --- */
.epaper-modal-box .epaper-dropdown-menu {
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
    border: none;
    min-width: 100%;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 60vh;
}
.epaper-modal-box .epaper-dropdown-parent-group {
    margin-bottom: 0;
}
.epaper-modal-box .epaper-dropdown-parent-btn {
    width: 100%;
    background: #fff;
    color: #002366;
    border: none;
    text-align: left;
    padding: 18px 20px 18px 24px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    border-bottom: 1px solid #e9ecef;
    letter-spacing: 0.2px;
    transition: background 0.2s, color 0.2s;
}
.epaper-modal-box .epaper-dropdown-parent-btn:hover,
.epaper-modal-box .epaper-dropdown-parent-group.open > .epaper-dropdown-parent-btn {
    background: #002366;
    color: #fff;
}
.epaper-modal-box .epaper-dropdown-parent-btn .edition-toggle-icon {
    font-size: 1.2em;
    font-weight: bold;
    margin-left: 10px;
    color: inherit;
    line-height: 1;
}
.epaper-modal-box .epaper-dropdown-child-menu {
    background: #fff;
    margin: 0;
    padding: 0 0 0 0;
    border: none;
    box-shadow: none;
    border-left: none;
}
.epaper-modal-box .epaper-dropdown-child-menu .epaper-dropdown-item {
    display: block;
    padding: 16px 20px 16px 44px;
    font-size: 1.08em;
    color: #d9005a;
    background: #fff;
    border: none;
    border-radius: 0;
    margin: 0;
    font-weight: normal;
    letter-spacing: 0.2px;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.2s, color 0.2s;
}
.epaper-modal-box .epaper-dropdown-child-menu .epaper-dropdown-item.active {
    color: #d9005a;
    font-weight: bold;
    background: #fff;
    text-decoration: underline;
}
.epaper-modal-box .epaper-dropdown-child-menu .epaper-dropdown-item:hover {
    background: #f2f2f2;
    color: #002366;
}

/* White close icon */
.epaper-modal-close-btn {
    color: #fff !important;
    border: 1.5px solid #fff !important;
    background: none;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 1.7em;
    margin-right: 0;
    margin-top: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.epaper-modal-close-btn:hover {
    color: #ff3b3b !important;
    border-color: #ff3b3b !important;
    background: #fff1f1;
}

/* Highlight active parent edition */
.epaper-modal-box .epaper-dropdown-parent-group.open > .epaper-dropdown-parent-btn,
.epaper-modal-box .epaper-dropdown-parent-btn.active {
    background: #e6f0ff;
    color: #003366;
    font-weight: bold;
}

/* Highlight active child edition */
.epaper-modal-box .epaper-dropdown-child-menu .epaper-dropdown-item.active {
    color: #fff;
    background: #d9005a;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
}

/* Make all inactive child editions appear as if hovered (bold and color), except the active one */
.epaper-modal-box .epaper-dropdown-child-menu .epaper-dropdown-item:not(.active) {
    color: #002366;
    font-weight: bold;
    background: #f2f2f2;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    /* Toolbar Mobile Optimization */
    #epaper-fixed-top-toolbar {
        padding: 8px;
        min-height: auto;
        flex-wrap: wrap;
        gap: 8px;
        transform: none !important;
        top: 113.6px; /* Mobile header height */
    }

    body.admin-bar #epaper-fixed-top-toolbar {
        top: calc(113.6px + 46px); /* Mobile header + mobile admin bar */
    }

    #epaper-content-area {
        margin-top: 173.6px !important; /* 113.6px header + 60px toolbar */
        min-height: calc(100vh - 173.6px) !important;
    }

    body.admin-bar #epaper-content-area {
        margin-top: calc(173.6px + 46px) !important;
        min-height: calc(100vh - 173.6px - 46px) !important;
    }

    /* Side Navigation Buttons */
    .epaper-side-nav-btn {
        width: 44px;
        height: 44px;
        opacity: 0.8;
    }

    .epaper-side-nav-btn .dashicons {
        font-size: 24px;
    }

    /* Thumbnail Strip Mobile Optimization */
    #epaper-thumbnail-strip-container {
        height: 100px;
    }

    #epaper-thumbnail-strip-container .epaper-thumbnails.swiper {
        height: 100px;
        padding: 0 30px;
    }

    #epaper-thumbnail-strip-container .epaper-thumbnail-slide {
        width: 70px;
        height: 80px;
    }

    #epaper-thumbnail-strip-container .epaper-thumbnail-image {
        max-height: 50px;
    }

    #epaper-thumbnail-strip-container .epaper-thumbnail-label {
        font-size: 0.7rem;
        padding: 4px 0;
    }

    /* Grid View Mobile Optimization */
    .epaper-page-grid-overlay {
        top: 120px;
        height: calc(100vh - 120px);
    }

    body.admin-bar .epaper-page-grid-overlay {
        top: calc(120px + 46px);
        height: calc(100vh - 120px - 46px);
    }

    #epaper-page-grid-view-container #epaper-page-grid-content {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        padding: 12px;
    }

    /* Share and Crop Buttons */
    .toolbar-crop-share-buttons {
        position: static;
        width: 100%;
        margin-top: 8px;
        padding: 8px;
        background: #f8f9fa;
        border-top: 1px solid #eee;
    }

    .toolbar-crop-share-buttons .button {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    /* Loading Indicator */
    #epaper-loading-indicator {
        padding: 12px 20px;
        font-size: 0.9em;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    #epaper-fixed-top-toolbar {
        padding: 6px;
    }

    #epaper-fixed-top-toolbar .toolbar-section-left,
    #epaper-fixed-top-toolbar .toolbar-section-right {
        gap: 4px;
    }

    #epaper-content-area {
        margin-top: 100px !important;
        height: calc(100vh - 100px) !important;
    }

    body.admin-bar #epaper-content-area {
        margin-top: calc(100px + 46px) !important;
        height: calc(100vh - 100px - 46px) !important;
    }

    #epaper-page-grid-view-container #epaper-page-grid-content {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 8px;
    }

    .epaper-grid-thumbnail-item .epaper-grid-page-number {
        font-size: 0.75em;
        padding: 4px;
    }
}

/* Mobile Touch Interaction Styles */
@media (max-width: 767px) {
    /* Toolbar Hide/Show Animation */
    #epaper-fixed-top-toolbar {
        transition: transform 0.3s ease-in-out;
    }

    #epaper-fixed-top-toolbar.toolbar-hidden {
        transform: translateY(-100%);
    }

    /* Touch Feedback */
    #epaper-fixed-top-toolbar .button:active {
        background-color: #e6e6e6;
        transform: scale(0.95);
    }

    /* Image Touch Interaction */
    .epaper-page-display img#current-epaper-image {
        touch-action: pan-x pan-y;
        transition: transform 0.2s ease-out;
    }

    /* Thumbnail Touch Feedback */
    #epaper-thumbnail-strip-container .epaper-thumbnail-slide:active {
        transform: scale(0.95);
        opacity: 0.8;
    }

    /* Grid Item Touch Feedback */
    #epaper-page-grid-view-container .epaper-grid-thumbnail-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* Loading Indicator Mobile Style */
    #epaper-loading-indicator {
        transform: translate(-50%, -50%) scale(0.9);
        white-space: nowrap;
        max-width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Responsive Datepicker Popup */
@media (max-width: 600px) {
    .epaper-datepicker-popup-container {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: 220px;
        max-width: 95vw;
        width: 95vw !important;
        box-sizing: border-box;
        padding: 8px !important;
        font-size: 1em;
    }
    .ui-datepicker {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        font-size: 1em !important;
    }
    .ui-datepicker-calendar td, .ui-datepicker-calendar th {
        padding: 0.2em 0.3em !important;
    }
    .ui-datepicker-header {
        padding: 0.4em 0.2em !important;
    }
}

@media (max-width: 600px) {
  .ui-datepicker-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .ui-datepicker-title select {
    display: inline-block !important;
    width: auto !important;
    min-width: 80px !important;
    max-width: 48% !important;
    margin: 0 2px !important;
    font-size: 1em !important;
    box-sizing: border-box !important;
  }
}

.epaper-spinner {
  display: inline-block;
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: epaper-spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes epaper-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}