.epaper-page {
  width: 100%;
  max-width: 800px;
  margin: 10px auto;
  display: block;
}

    body {
      background: #f4f6f9;
      font-family: 'Segoe UI', sans-serif;
      margin: 0;
    }
    .marquee-bar {
      background: #343a40;
      color: red;
      font-weight: bold;
      font-size: 16px;
      padding: 6px 0;
    }

.second-bar {
  background: rgba(242, 248, 248, 0.79);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* allow wrapping */
  gap: 10px;        /*  spacing between items */
  border-bottom: 2px solid #000;
}

.second-bar .left,
.second-bar .right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.second-bar .btn {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 5px;
}
.second-bar select {
  padding: 4px 8px;
  font-size: 13px;
}

#viewer-container {
  display: flex;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

#thumbnail-panel {
  width: 200px;
  background: #fff;
  padding: 0;
  margin-left: 250px;
  border-right: 1px solid #ccc;
  overflow-y: auto;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#canvas-container {
  flex-grow: 1;
  padding: 0; /* ✅ remove extra space */
  margin-right: 250px;
  background: #fff;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: start;
}

#pdf-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.thumbnail {
  width: 100%;
  cursor: pointer;
  margin-bottom: 12px;
  border: 2px solid transparent;
  transition: border 0.3s ease;
}
.thumbnail.active {
  border-color: #007bff;
}

@media (max-width: 768px) {
  #viewer-container {
    flex-direction: column;
    padding: 10px;
  }

  #thumbnail-panel {
    display: none !important;
  }

  #canvas-container {
    margin: 0;
    width: 100%;
    padding: 10px 0;
    justify-content: center;
    align-items: center;
    position: relative;
  overflow: auto;
  touch-action: auto;
  }

  #pdf-canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
}


  .clip-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 320px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: none;
}
.clip-modal-header {
  display: flex; justify-content: space-between; align-items: center;
}
.clip-preview { width: 100%; border: 1px solid #ccc; margin: 10px 0; }
#clipLink {
  width: 100%; padding: 5px; margin-bottom: 10px;
  border: 1px solid #ccc; border-radius: 4px;
}
.clip-actions, .clip-footer {
  display: flex; justify-content: space-between;
}
.clip-btn {
  flex: 1; margin: 0 5px; padding: 6px;
  text-align: center; color: white;
  cursor: pointer;
}
.fb { background: #3b5998; }
.wa { background: #25D366; }
.email { background: #007bff; }
.download { background: #6c757d; text-decoration: none; }
.close { background: #dc3545; border: none; }
.share { position: absolute; background: green; top: 10px; z-index: 10001; display: none; }
.cancel { position: absolute; background: red; top: 10px; z-index: 10001; display: none; }

/* Resizable & Movable Crop Box */
#clipBox {
  position: absolute;
  border: 2px solid blue;
  background: rgba(255,255,255,0.4);
  box-sizing: border-box;
  cursor: move;
  z-index: 10000;
}

#clipBox .handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: blue;
  z-index: 10001;
}

.handle.nw { top: -6px; left: -6px; cursor: nwse-resize; }
.handle.ne { top: -6px; right: -6px; cursor: nesw-resize; }
.handle.sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle.se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.handle.n  { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.handle.s  { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.handle.e  { right: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.handle.w  { left: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

#calendarPopup {
  transition: all 0.2s ease-in-out;
  max-width: 300px;
  overflow: hidden;
}
.flatpickr-calendar {
  z-index: 9999 !important;
}
#clipPreview {
  display: none;
  max-width: 100%;
  max-height: 500px;
  margin: auto;
}

/* .ad-banner {
  height: auto;
  max-height: 120px;
  max-width: 100%;
  width: auto;
  object-fit: cover;
}

@media (max-width: 768px) {
  .ad-banner {
    height: 60px;
  }
} */
 /* Logo */
/* Common styles */
/* .ad-banner {
  display: block;
  height: auto;
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
} */
#adArea img,
#adArea video {
  height: auto !important;
  object-fit: contain !important;
  display: block;
  max-width: 100%;
}

/* Desktop: Right align */
@media (min-width: 769px) {
  #adArea img,
  #adArea video {
    width: auto !important;
    height: 140px !important;
    margin-left: auto;
    margin-right: 0;
  }
}

/* Mobile: Full width */
@media (max-width: 768px) {
  #adArea img,
  #adArea video {
    width: 100% !important;
    height: auto !important;
    margin: 0 auto;
  }
}

.social-icon {
  color: white;
  background-color: red;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
}
