/* 
    Created on : Sep 15, 2025, 2:09:19 PM
    Author     : Prenero Studio
*/

  #flipbook {
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 20px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
  }
  #flipbook .page { background: white; }
  canvas { width: 100%; height: auto; display: block; }

  /* Floating Toolbar Overlay */
  .controls {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    border-radius: 30px;
    padding: 6px 12px;
    display: flex;
    gap: 8px;
    z-index: 2000;
  }
  .controls button,
  .controls input {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    transition: background 0.2s;
    border-radius: 5px;
  }
  .controls button:hover { background: rgba(255,255,255,0.2); }
  .controls input {
    width: 50px;
    text-align: center;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 5px;
    border: none;
  }

  /* Flipbook wrapper */
  .flipbook-wrapper {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
  }

  /* Progress Bar (RTL fill) */
  .progress-container {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    position: fixed;
    bottom: 0;
    left: 0;
    cursor: pointer;
    direction: rtl; /* ✅ RTL direction */
  }
  .progress-bar {
    height: 100%;
    background: #4caf50;
    width: 0%;
    transition: width 0.3s ease;
    float: right; /* ✅ Fill from right */
  }
  .progress-text {
    position: fixed;
    bottom: 25px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
  }

  /* Responsive */
  @media (max-width: 768px) {
    #flipbook { height: 400px; }
    .controls { font-size: 12px; }
    .controls button, .controls input { font-size: 12px; padding: 6px 10px; }
  }
  @media (max-width: 480px) {
    #flipbook { height: 300px; }
  }