/* PDF DIP Viewer – Frontend Styles */

.pdf-dip-wrapper {
    font-family: 'SolaimanLipi', 'Kalpurush', Arial, sans-serif;
    background: #f8f9fa;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    overflow: hidden;
    margin: 28px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── Header ─────────────────────────────── */
.pdf-dip-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pdf-dip-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pdf-dip-icon { font-size: 28px; line-height: 1; }
.pdf-dip-info { display: flex; flex-direction: column; }
.pdf-dip-title { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.pdf-dip-header-badge {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── Zoom bar ────────────────────────────── */
.pdf-dip-zoombar {
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.pdf-dip-zoom-btn {
    background: #1a3a5c;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pdf-dip-zoom-btn:hover { background: #2d6a9f; }
.pdf-dip-zoom-reset { font-size: 15px; background: #64748b; }
.pdf-dip-zoom-reset:hover { background: #475569; }
.pdf-dip-zoom-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    min-width: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 6px;
}
.pdf-dip-zoom-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-right: auto;
}

/* ── Loading ─────────────────────────────── */
.pdf-dip-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.pdf-dip-loading p { margin: 0; font-size: 14px; }
.pdf-dip-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #2d6a9f;
    border-radius: 50%;
    animation: pdf-dip-spin 0.8s linear infinite;
}
@keyframes pdf-dip-spin { to { transform: rotate(360deg); } }

/* ── Canvas ─────────────────────────────── */
.pdf-dip-canvas-wrap {
    display: none;
    background: #e5e7eb;
    text-align: center;
    padding: 16px;
    overflow: auto;        /* scroll when zoomed in */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}
.pdf-dip-canvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    border-radius: 3px;
    -webkit-user-select: none;
    user-select: none;
    max-width: none;       /* allow wider than container when zoomed */
    touch-action: pan-x pan-y pinch-zoom;
}

/* ── Footer navigation ───────────────────── */
.pdf-dip-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.pdf-dip-btn {
    background: #1a3a5c;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.pdf-dip-btn:hover { background: #2d6a9f; transform: translateY(-1px); }
.pdf-dip-btn:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.pdf-dip-page-info {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 600px) {
    .pdf-dip-header { padding: 10px 12px; }
    .pdf-dip-title { font-size: 12px; }
    .pdf-dip-icon { font-size: 22px; }
    .pdf-dip-btn { padding: 8px 10px; font-size: 12px; }
    .pdf-dip-canvas-wrap { padding: 8px; }
    .pdf-dip-footer { padding: 10px 12px; gap: 6px; }
    .pdf-dip-zoom-hint { display: none; } /* hide hint on small screens */
}
