@import url('https://fonts.maateen.me/solaiman-lipi/font.css');

body.zap-print-body { margin: 0; padding: 0; background: #f0f2f5; font-family: 'SolaimanLipi', Arial, sans-serif !important; }

/* --- E-PAPER STYLES (Visible) --- */
.zap-print-page {
    max-width: 900px; margin: 50px auto 50px; background: #ffffff; border: 2px solid #106634; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); box-sizing: border-box; position: relative;
}
.zap-print-banner { 
    width: 100%; 
    line-height: 0; 
    border-bottom: 1px solid #106634;
    position: relative; 
    min-height: 200px; 
    background-size: cover;
    background-position: center;
}
.zap-print-banner-img { 
    width: 100%; height: auto; display: block; 
    min-height: 200px; 
    object-fit: cover;
}


/* --- MODE TOGGLING: E-Paper vs Photo Card --- */
body.zap-mode-epaper #zap-print-page { 
    display: block; 
}
body.zap-mode-epaper #zap-photocard-hidden-wrapper { 
    display: none; 
}

body.zap-mode-photocard #zap-print-page { 
    display: none; 
}
body.zap-mode-photocard #zap-photocard-hidden-wrapper {
    display: block;
    max-width: 900px;
    margin: 40px auto 50px;
    position: relative;
    left: auto;
    top: auto;
}
/* Logo positioned on the E-Paper banner */
.zap-print-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-height: 115px; 
    width: auto;
    z-index: 10;
    padding: 0;
    background: none;
    border-radius: 0;
}


/* Position Classes */
.zap-print-banner.logo-center .zap-print-logo {
    left: 50%;
    transform: translate(-50%, -50%);
}
.zap-print-banner.logo-left .zap-print-logo {
    left: 15px; 
}
.zap-print-banner.logo-right .zap-print-logo {
    right: 15px; 
    left: auto;
}

.zap-print-meta-bar { 
    color: #ffffff; text-align: center; padding: 8px 12px; font-size: 15px; font-weight: bold; border-bottom: 1px solid #ddd; 
}

.zap-print-main { padding: 25px 35px 10px; }
.zap-print-title { font-size: 32px; margin: 0 0 20px 0; line-height: 1.3; font-weight: 700; text-align: center; color: #000; }
.zap-print-image-wrap { text-align: center; margin: 0 0 20px; }
.zap-print-image { max-width: 100%; height: auto; border-radius: 2px; border: 1px solid #eee; }
.zap-print-image-inside { width: 100%; height: auto; margin-bottom: 15px; display: block; border-radius: 4px; border: 1px solid #eee; }
.zap-print-content { font-size: 17px; line-height: 1.6; text-align: justify; color: #111; }

/* ============================================
   HIDE ALL CONTENT IMAGES (CSS ONLY SOLUTION)
   ============================================ */

.zap-print-content img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
}

.zap-print-content img.zap-print-image-inside {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 15px !important;
    border-radius: 4px !important;
    border: 1px solid #eee !important;
}

.zap-print-content figure,
.zap-print-content picture {
    display: none !important;
    visibility: hidden !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.zap-print-content img:not(.zap-print-image-inside) {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* ============================================
   END IMAGE HIDING SOLUTION
   ============================================ */

.zap-print-epaper-2col .zap-print-content { column-count: 2; column-gap: 30px; column-rule: none; }
.zap-print-epaper-3col .zap-print-content { column-count: 3; column-gap: 20px; }
.zap-print-editor-info { margin-top: 20px; text-align: center; font-size: 14px; font-weight: 600; color: #333; }
.zap-print-footer { background: #f9f9f9; border-top: 1px solid #106634; padding: 10px; text-align: center; font-size: 13px; color: #666; }

/* --- PHOTO CARD BASE STYLES --- */
.zap-photocard-design {
    width: 800px; 
    min-height: 800px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    font-family: 'SolaimanLipi', Arial, sans-serif;
    box-sizing: border-box;
    margin: 0 auto;
}

.zap-pc-header {
    background: #ffffff;
    padding: 15px;
    text-align: center;
    display: flex; justify-content: center; align-items: center;
    height: 80px; 
}
.zap-pc-logo { 
    max-height: 115px; 
    width: auto; 
}
.zap-pc-site-name { font-size: 30px; color: #e71e24; margin: 0; }
.zap-pc-body {
    padding: 0 20px;
    flex: 1;
    display: flex; justify-content: center; align-items: center;
    background: #ffffff;
}
.zap-pc-image-box {
    //border: 4px solid #f4b400; 
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}
.zap-pc-main-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; 
}
.zap-pc-footer {
    background: #e71e24; 
    color: #ffffff;
    padding: 25px 30px;
    text-align: center;
    margin-top: 20px;
}
.zap-pc-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.zap-pc-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 800;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 15px;
}
.zap-pc-read-more { font-size: 20px; opacity: 0.9; font-style: italic; font-weight: 800; }
.zap-pc-url { font-size: 20px; font-weight: 800; }

/* --- CONTROLS --- */
.zap-print-controls { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 99999; 
    display: flex; 
    flex-direction: column; 
    gap: 0; 
    align-items: flex-end; 
    background: rgba(255,255,255,0.95); 
    border-radius: 6px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 4px;
}

.zap-control-row {
    display: flex; 
    gap: 0; 
    align-items: center;
    width: 100%; 
}

.zap-control-line-1 {
    display: flex;
    align-items: center;
    padding: 2px 0 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    gap: 0;
}

.zap-control-line-2 {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px 0 2px;
    justify-content: center;
}

.zap-btn { 
    border: none; 
    padding: 8px 14px; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: bold; 
    text-decoration: none; 
    font-family: 'SolaimanLipi', sans-serif; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    transition: all 0.2s; 
    border-right: 1px solid rgba(0,0,0,0.1) !important; 
    background-color: transparent; 
}

.zap-control-line-2 .zap-btn {
    background-color: #ffffff;
    color: #333;
}

.zap-btn-fb { color: #106634; }
.zap-btn-print { color: #e71e24; }
.zap-btn-save { color: #f4b400; }
.zap-btn-back { color: #0b6b3a; }

.zap-switch-wrapper {
    position: relative;
    display: flex;
    background: transparent; 
    height: 28px; 
    gap: 6px; 
}

.zap-switch-btn {
    flex: 0 0 auto;
    padding: 5px 14px; 
    border-radius: 4px; 
    color: #ffffff; 
    transition: all 0.3s;
    font-size: 14px; 
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.zap-switch-btn[data-mode="epaper"] { background: #0b6b3a; width: 76px; }
.zap-switch-btn[data-mode="photocard"] { background: #e71e24; width: 85px; }

.zap-switch-wrapper .zap-switch-btn { background: #6c757d; opacity: 0.7; }

#zap-mode-switch[data-mode="epaper"] .zap-switch-epaper,
body.zap-mode-epaper #zap-mode-switch .zap-switch-epaper { background: #0b6b3a; opacity: 1; }

#zap-mode-switch[data-mode="photocard"] .zap-switch-photocard,
body.zap-mode-photocard #zap-mode-switch .zap-switch-photocard { background: #e71e24; opacity: 1; }

.zap-btn-font { 
    background-color: transparent; 
    color: #333; 
    width: 36px; 
    height: 28px;
    padding: 2px 0; 
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zap-control-line-1 .zap-btn-font:first-of-type { margin-left: auto; }
.zap-control-line-1 .zap-btn-font:last-of-type { margin-left: 4px; }

.zap-control-line-2 .zap-btn {
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
    margin: 0;
}

.zap-control-line-2 .zap-btn + .zap-btn { margin-left: 6px; }

.zap-control-line-2 .zap-btn-fb { background-color: #0d6efd; color: #ffffff; }
.zap-control-line-2 .zap-btn-print { background-color: #dc3545; color: #ffffff; }
.zap-control-line-2 .zap-btn-save { background-color: #198754; color: #ffffff; }
.zap-control-line-2 .zap-btn-back { background-color: #343a40; color: #ffffff; }

.zap-toast { 
    position: relative; 
    background: #106634; 
    color: white; 
    padding: 5px 10px; 
    border-radius: 0 0 6px 6px; 
    display: flex; 
    align-items: center; 
    width: 100%; 
    box-sizing: border-box;
    border-top: 1px solid rgba(255,255,255,0.3); 
}

#zap-loading { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.9); z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #333; font-weight: bold; }
.zap-spinner { border: 5px solid #f3f3f3; border-top: 5px solid #e71e24; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media print {
    .no-print, .zap-print-controls, #zap-loading, #zap-photocard-hidden-wrapper, .zap-toast { display: none !important; }
    body.zap-print-body { background: #ffffff; }
    .zap-print-page { box-shadow: none; margin: 0; border: none !important; max-width: 100%; width: 100%; }
}

/* --- PHOTO CARD STYLE ACCENTS --- */
.photocard-green_red_style { position: relative; }
.photocard-green_red_style .zap-pc-header { background: #ffffff; padding-top: 15px; height: 90px; }
.photocard-green_red_style .zap-pc-header::before {
    content: '';
    display: block;
    width: 100%;
    height: 10px; 
    background: #0b6b3a; 
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.photocard-green_red_style .zap-pc-logo { position: relative; z-index: 2; max-height: 90px; }
.photocard-green_red_style .zap-pc-footer { background: #e71e24; color: #ffffff; }


/* ===== RESPONSIVE LAYOUT ===== */

@media screen and (min-width: 1024px) {
    .zap-print-page, .zap-photocard-design { width: 90%; max-width: 900px; margin: 70px auto 40px; }
}

@media screen and (max-width: 1023px) {
    .zap-print-page, .zap-photocard-design { width: 100%; max-width: 100%; min-height: auto; margin: 90px auto 30px; }
    .zap-print-controls { top: 8px; right: 8px; transform: scale(0.9); transform-origin: top right; }
    .zap-print-main { padding: 16px 12px 10px; }
    .zap-print-title { font-size: 24px; }
    .zap-pc-title { font-size: 26px; }

    /* UPDATED: FORCED SINGLE-LINE CENTERED META BAR */
    .zap-pc-meta-row {
        flex-direction: row !important; /* Keep items side-by-side */
        justify-content: center !important; /* Center the line */
        align-items: center;
        gap: 15px; /* Spacing between centered items */
        padding-top: 10px !important;
        text-align: center;
    }

    .zap-pc-meta-row, .zap-pc-read-more, .zap-pc-url {
        font-size: 15px !important; /* Unified mobile font size */
        white-space: nowrap !important; /* No text wrapping */
    }
}