/*
Theme Name: WebLife IT ePaper
Theme URI: https://weblifeit.com
Author: MD. BAYAZID KHAN
Author URI: https://weblifeit.com
Description: A News ePaper viewer theme converted from the supplied HTML design. Includes WordPress ePaper Issue management, responsive page viewer, zoom, pan, fullscreen and lightbox navigation.
Version: 1.4.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: weblifeit-epaper
*/

:root {
    --epaper-red: #c82333;
    --epaper-dark-red: #8b1818;
    --epaper-black: #1a1a1a;
    --epaper-bg: #f4f4f4;
    --epaper-border: #ddd;
}

html { margin: 0; padding: 0; }
body { margin: 0; background-color: var(--epaper-bg); color: #333; }

*, *::before, *::after { box-sizing: border-box; }

.epaper-site,
.epaper-site button,
.epaper-site input,
.epaper-site select {
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif !important;
}

a { text-decoration-thickness: 1px; }
.epaper-container { width: 97%; max-width: 1250px; margin: 0 auto; }

/* Top bar */
.epaper-top-bar { background: var(--epaper-black); color: #fff; padding: 8px 0; font-size: 14px; }
.epaper-top-bar .epaper-container { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.epaper-date-info { display:flex; align-items:center; gap:8px; }
.epaper-date-picker { background:#333; color:#fff; border:1px solid #555; padding:4px 8px; border-radius:4px; font-size:14px; outline:none; cursor:pointer; }
.epaper-date-picker::-webkit-calendar-picker-indicator { filter: invert(1); cursor:pointer; }
.epaper-social-links a { color:#fff; margin-left:12px; text-decoration:none; }
.epaper-social-links a:hover { color:#eee; }

/* Main header */
.epaper-main-header { display:flex; justify-content:space-between; align-items:center; padding:15px 20px; background:#fff; border-bottom:1px solid var(--epaper-border); }
.epaper-logo-text { font-size:32px; font-weight:700; color:var(--epaper-red); text-decoration:none; }
.epaper-logo-image { display:block; max-height:52px; width:auto; }
.epaper-edition-selector { display:flex; align-items:center; gap:7px; }
.epaper-edition-selector select { padding:6px 12px; font-size:14px; border:1px solid #ccc; border-radius:4px; background:#fff; }

/* Page navigation */
.epaper-page-nav { background:var(--epaper-red); color:#fff; padding:10px 0;}
.epaper-nav-content { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.epaper-page-controls { display:flex; align-items:center; gap:15px; }
.epaper-page-controls .epaper-btn { background:#fff; color:var(--epaper-red); border:none; padding:6px 14px; font-weight:700; cursor:pointer; border-radius:3px; }
.epaper-page-controls .epaper-btn:hover:not(:disabled) { background:#f0f0f0; }
.epaper-page-controls .epaper-btn:disabled { cursor:not-allowed; opacity:.55; }
.epaper-page-dropdown select { padding:6px; border-radius:3px; border:none; }

/* Main layout */
.epaper-main { display:flex; gap:20px; margin:20px auto; align-items:flex-start; }
.epaper-content { flex:3; min-width:0; background:#fff; padding:15px; box-shadow:0 0 10px rgba(0,0,0,.08); border-radius:4px; }
.epaper-sidebar { flex:1; min-width:260px; background:#fff; padding:15px; box-shadow:0 0 10px rgba(0,0,0,.08); border-radius:4px; max-height:870px; overflow-y:auto; }
.epaper-sidebar h3 { margin:0 0 15px; font-size:18px; border-bottom:2px solid var(--epaper-red); padding-bottom:6px; }

/* Toolbar */
.epaper-viewer-toolbar { display:flex; gap:10px; margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom:10px; flex-wrap:wrap; }
.epaper-viewer-toolbar button { background:#f8f9fa; border:1px solid #ddd; padding:8px 14px; cursor:pointer; border-radius:4px; font-size:14px; display:flex; align-items:center; gap:6px; }
.epaper-viewer-toolbar button:hover { background:#e2e6ea; }

/* Viewer */
.epaper-paper-viewer-wrapper { position:relative; width:100%; display:flex; align-items:center; justify-content:center; }
.epaper-paper-viewer-box { overflow:hidden; max-height:800px; width:100%; min-height:240px; border:1px solid #eee; background:#f8f9fa; text-align:center; padding:10px; position:relative; user-select:none; }
.epaper-paper-viewer-box img { max-width:100%; height:auto; display:inline-block; box-shadow:0 4px 12px rgba(0,0,0,.15); transition:transform .1s ease-out; transform-origin:center center; cursor:zoom-in; }
.epaper-paper-viewer-box img.grab { cursor:grab; }
.epaper-paper-viewer-box img.grabbing { cursor:grabbing; }
.epaper-viewer-nav-btn { position:absolute; top:50%; transform:translateY(-50%); background:var(--epaper-dark-red); color:#fff; border:none; width:45px; height:90px; font-size:26px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:10; box-shadow:2px 2px 8px rgba(0,0,0,.3); transition:background-color .2s ease,opacity .2s ease; }
.epaper-viewer-nav-btn:hover:not(.disabled) { background:#b30000; }
.epaper-viewer-nav-btn.prev { left:0; border-top-right-radius:4px; border-bottom-right-radius:4px; }
.epaper-viewer-nav-btn.next { right:0; border-top-left-radius:4px; border-bottom-left-radius:4px; }
.epaper-viewer-nav-btn.disabled { opacity:.3; cursor:not-allowed; background:#555; }

/* Thumbnails */
.epaper-thumbnail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.epaper-thumb-item { text-align:center; border:2px solid #eee; padding:6px; cursor:pointer; border-radius:4px; background:#fafafa; transition:all .2s ease; }
.epaper-thumb-item:hover, .epaper-thumb-item.active { border-color:var(--epaper-red); }
.epaper-thumb-item.active { background:#fce8e6; }
.epaper-thumb-item img { width:100%; height:auto; border:1px solid #ddd; display:block; }
.epaper-thumb-item span { display:block; margin-top:5px; font-size:13px; font-weight:700; color:#333; }
.epaper-thumb-item.active span { background:var(--epaper-red); color:#fff; padding:3px 6px; border-radius:2px; }

/* Empty state */
.epaper-empty { padding:50px 20px; text-align:center; color:#666; }
.epaper-empty strong { color:var(--epaper-red); }
.epaper-empty a { color:var(--epaper-red); }

.epaper-empty-date { margin:0 0 10px; color:#777; font-size:15px; }
.epaper-date-not-found h2 { margin:8px 0; color:#222; font-size:28px; }
.epaper-empty-icon { width:68px; height:68px; margin:0 auto 15px; border-radius:50%; background:#f3e7e7; display:flex; align-items:center; justify-content:center; font-size:31px; }
.epaper-empty-home-btn { display:inline-block; margin-top:8px; padding:9px 18px; border-radius:4px; background:var(--epaper-red); color:#fff !important; text-decoration:none; }
.epaper-empty-home-btn:hover { background:var(--epaper-dark-red); }


/* Modal */
.epaper-image-modal { display:none; position:fixed; z-index:1000; inset:0; overflow:hidden; background:rgba(0,0,0,.92); backdrop-filter:blur(5px); justify-content:center; align-items:center; }
.epaper-image-modal.open { display:flex; }
.epaper-modal-container { position:relative; display:flex; justify-content:center; align-items:center; width:100%; height:100%; padding:10px; }
.epaper-modal-content { max-width:82%; max-height:88vh; border-radius:4px; box-shadow:0 0 20px rgba(255,255,255,.2); animation:epaperZoomIn .3s ease-out; object-fit:contain; user-select:none; }
.epaper-modal-nav-btn { position:absolute; top:50%; transform:translateY(-50%); background:var(--epaper-dark-red); color:#fff; border:none; width:48px; height:95px; font-size:24px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:1010; transition:background .3s,opacity .3s; }
.epaper-modal-nav-btn:hover:not(.disabled) { background:#b30000; }
.epaper-modal-nav-btn.prev { left:15px; }
.epaper-modal-nav-btn.next { right:15px; }
.epaper-modal-nav-btn.disabled { opacity:.2; cursor:not-allowed; background:#444; }
.epaper-close-modal { position:absolute; top:20px; right:30px; color:#fff; font-size:38px; font-weight:700; cursor:pointer; z-index:1020; transition:.2s; }
.epaper-close-modal:hover { color:var(--epaper-red); }
@keyframes epaperZoomIn { from { transform:scale(.85); opacity:0; } to { transform:scale(1); opacity:1; } }

/* Footer */
.epaper-footer { background:var(--epaper-black); color:#bbb; text-align:center; padding:25px 0; margin-top:40px; font-size:14px; }
.epaper-footer-links { margin-bottom:12px; display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.epaper-footer-links a { color:#fff; text-decoration:none; }

/* WordPress compatibility */
.epaper-site .screen-reader-text { border:0; clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; word-wrap:normal !important; }
.epaper-site .aligncenter { margin-left:auto; margin-right:auto; }

@media (max-width:768px) {
    .epaper-main { flex-direction:column; }
    .epaper-sidebar { width:100%; max-height:none; overflow:visible; }
    .epaper-thumbnail-grid { display:flex; flex-direction:row; flex-wrap:nowrap; overflow-x:auto; gap:12px; padding-bottom:10px; -webkit-overflow-scrolling:touch; }
    .epaper-thumb-item { flex:0 0 140px; }
    .epaper-main-header { flex-direction:column; gap:10px; }
    .epaper-viewer-nav-btn { width:34px; height:60px; font-size:18px; }
    .epaper-close-modal { top:15px; right:20px; font-size:32px; }
    .epaper-modal-content { max-width:88%; max-height:80vh; }
    .epaper-modal-nav-btn { width:34px; height:60px; font-size:18px; }
    .epaper-modal-nav-btn.prev { left:5px; }
    .epaper-modal-nav-btn.next { right:5px; }
    .epaper-top-bar .epaper-container { flex-direction:column; gap:8px; }
    .epaper-nav-content { flex-direction:column; gap:0px; }
    .epaper-page-dropdown select { display:none; }
    .epaper-viewer-toolbar {
        display: flex !important;
        gap: 5px !important;
        justify-content: center !important;
    }
}

@media (max-width:480px) {
    .epaper-thumb-item { flex:0 0 120px; }
    .epaper-viewer-nav-btn, .epaper-modal-nav-btn { width:28px; height:48px; font-size:15px; }
    .epaper-logo-text { font-size:27px; }
}

/* Dynamic social icons */
.weblifeit-social-icons { display:flex; align-items:center; gap:8px; }
.weblifeit-social-icon {
    width:30px; height:30px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
    background:rgba(255,255,255,.12); color:#fff !important; text-decoration:none !important;
    border:1px solid rgba(255,255,255,.22); font-family:Arial,sans-serif; font-weight:700; line-height:1;
    transition:transform .2s ease, background .2s ease, border-color .2s ease;
}
.weblifeit-social-icon:hover { transform:translateY(-1px); background:rgba(255,255,255,.23); border-color:rgba(255,255,255,.45); }
.weblifeit-social-icon .weblifeit-icon-text { font-size:16px; }
.weblifeit-social-icon .weblifeit-icon-glyph { font-size:15px; }
.weblifeit-social-footer { justify-content:center; margin-bottom:14px; }
.weblifeit-social-footer .weblifeit-social-icon { width:34px; height:34px; background:#2b2b2b; border-color:#444; }
.epaper-logo-tagline { margin-top:2px; color:#777; font-size:13px; }
.epaper-footer-brand { color:#fff; font-size:20px; margin-top:4px; }
.epaper-footer-text { margin:8px auto 12px; color:#aaa; max-width:620px; }
@media (max-width:768px) {
    .weblifeit-social-top { justify-content:center; }
    .epaper-logo { text-align:center; }
}

/* v1.3.0 — locale-aware typography and readable localized date */
.epaper-readable-date { margin-left: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
html[lang^="bn"] body,
html[lang^="bn"] .epaper-site { font-family: 'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif; }
html[lang^="en"] body,
html[lang^="en"] .epaper-site { font-family: Arial, Helvetica, sans-serif; }




/* v1.3.4 — administrator-controlled localized date picker for every visitor */
.epaper-date-info { position:relative; }
.weblifeit-date-picker-wrap { position:relative; }
.weblifeit-date-picker-button { display:inline-block; width:134px; min-width:134px; height:34px; box-sizing:border-box; padding:0 10px; border:0; border-radius:4px; background:#333; color:#fff; cursor:pointer; font:inherit; text-align:center; }
.weblifeit-calendar-icon { font-size:13px; line-height:1; }
.weblifeit-native-date-input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.weblifeit-calendar { position:absolute; top:calc(100% + 8px); left:0; width:290px; background:#fff; color:#222; border:1px solid #cfcfcf; border-radius:6px; box-shadow:0 10px 28px rgba(0,0,0,.24); padding:10px; z-index:2000; font-family:'SolaimanLipi','Noto Sans Bengali',Arial,sans-serif; }
.weblifeit-calendar[hidden] { display:none; }
.weblifeit-date-picker-button:focus { outline:2px solid #fff; outline-offset:1px; }
.weblifeit-calendar-head { display:grid; grid-template-columns:36px 1fr 36px; align-items:center; gap:6px; margin-bottom:8px; }
.weblifeit-cal-nav,.weblifeit-cal-title { border:1px solid #ddd; background:#f7f7f7; color:#222; min-height:34px; border-radius:4px; cursor:pointer; }
.weblifeit-cal-title { font-weight:700; padding:0 7px; }
.weblifeit-cal-nav:hover,.weblifeit-cal-title:hover { background:#ececec; }
.weblifeit-calendar-weekdays,.weblifeit-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.weblifeit-calendar-weekdays { margin-bottom:4px; }
.weblifeit-calendar-weekdays span { font-size:11px; font-weight:700; color:#666; padding:4px 0; }
.weblifeit-cal-day,.weblifeit-cal-empty { min-height:34px; border-radius:4px; }
.weblifeit-cal-day { border:1px solid transparent; background:#fff; color:#222; cursor:pointer; font:inherit; }
.weblifeit-cal-day:hover { border-color:var(--epaper-red); background:#fff4f4; }
.weblifeit-cal-day.active { background:var(--epaper-red); color:#fff; font-weight:700; }
html body .epaper-site, html body .epaper-site * { font-family:'SolaimanLipi','Noto Sans Bengali',Arial,sans-serif; }
@media (max-width:768px) {
    .weblifeit-calendar { left:50%; transform:translateX(-50%); width:min(290px, calc(100vw - 30px)); }
}


/* v1.3.6 — fixed numeric date-picker display and robust Bengali typography */
.weblifeit-date-picker-button { font-variant-numeric: normal; min-width: 134px; color:#fff !important; }
html[lang^="bn"] .epaper-site,
html[lang^="bn"] .epaper-site * { font-family:'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif !important; }
.weblifeit-calendar, .weblifeit-calendar button, .weblifeit-calendar span { font-family:'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif !important; }

/* v1.4.1 — prevent a failed image response from replacing the no-paper state */
.epaper-paper-viewer-box.is-unavailable { min-height: 240px; }
.epaper-paper-viewer-wrapper.is-unavailable .epaper-viewer-nav-btn { display:none; }
.epaper-client-error { min-height: 190px; display:flex; flex-direction:column; justify-content:center; box-sizing:border-box; }


/* v1.4.2 — never report an image-load failure as a missing ePaper; mobile-safe sizing */
.epaper-paper-viewer-box #main-paper-img { display:inline-block; max-width:100%; width:auto; height:auto; }
.epaper-client-error { width:100%; min-height:220px; box-sizing:border-box; padding:30px 20px; }
@media (max-width:768px) {
  .epaper-paper-viewer-box { width:100%; min-height:220px; padding:5px; box-sizing:border-box; }
  .epaper-paper-viewer-box #main-paper-img { max-width:100%; width:auto; height:auto; }
}


.weblifeit-dvowner{
    color:#36393a; font-size: 14px; margin: 0;
}


/* টুলটিপ কন্টেইনার */
.weblifeit-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* নম্বর দেখানোর বক্স */
.weblifeit-tooltip .tooltip-text {
    visibility: hidden;
    width: 230px;
    background-color: #1d2327;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    
    /* পজিশন: টেক্সটের উপরে দেখাবে */
    position: absolute;
    z-index: 1;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%);
    
    /* স্মুথ অ্যানিমেশন */
    opacity: 0;
    transition: opacity 0.3s;
}

/* মাউস নিলেই নম্বর ভিজিবল হবে */
.weblifeit-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}