/* DD Photobook Editor - File 2 (photobook-editor.css) */
.ddpb-frame-modal__foot{
    display:flex !important;
    justify-content:flex-end;
    align-items:center;
    gap:12px;
    flex-wrap:nowrap !important;
}

.ddpb-frame-modal__foot .ddpb-grid-action{
    width:auto !important;
    height:42px !important;

    padding:0 18px !important;

    display:flex !important;
    justify-content:center;
    align-items:center;

    white-space:nowrap !important;
    font-size:14px;
    font-weight:700;
}
/* כפתורי הפעולות בתחתית חלון צבע רקע */
.ddpb-bg-modal__foot,
.ddpb-frame-modal__foot{
    display:flex !important;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap !important;
}

/* הכפתורים עצמם */
.ddpb-bg-modal__foot .ddpb-grid-action,
.ddpb-frame-modal__foot .ddpb-grid-action{

    width:auto !important;

    height:42px !important;
    padding:0 18px !important;

    display:flex !important;
    justify-content:center !important;
    align-items:center !important;

    white-space:nowrap !important;
    overflow:visible !important;

    border-radius:10px !important;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1 !important;
}
/* Global font */
*{
  font-family: 'Rubik';
}
.ddpb-tool-smartcrop{display:none !important;}
.ddpb-tool-smartlayout{display:none !important;}
.ddpb-pro-toolbar{display:none !important;}
.my-cube-btn{display:none !important;}
/* Root */
.ddpb-root{
  direction:rtl;
  font-family:system-ui,-apple-system,"Segoe UI",Arial;
  max-width:1400px;
  margin:18px auto;
  padding:0 14px;
  box-sizing:border-box;
}

/* Card */
.ddpb-card{



  padding:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.ddpb-title{
  font-weight:900;
  font-size:34px;
  text-align:center;
}

.ddpb-sub{
  opacity:.55;
  text-align:center;
  margin:6px 0 14px;
  font-weight:800;
}

.ddpb-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:14px 0 10px;
}

.ddpb-row-right{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

.ddpb-h2{
  font-weight:900;
  font-size:18px;
}

.ddpb-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.ddpb-primary{
  padding:14px 18px;
  border:none;
  border-radius:16px;
  background:#00b39b;
  color:#fff;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(0,179,155,.18);
}

.ddpb-btn,
.ddpb-upload{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border:1px solid #e8e9ee;
  border-radius:16px;
  background: #0675c4;
  font-weight:900;
      color: #fff;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(0,0,0,.04);
}

.ddpb-btn:hover,
.ddpb-upload:hover{
  border-color:#dcdde4;
}

/* Dropzone */
.ddpb-dropzone-wrap{
  margin:10px 0 14px;
}

#ddpb_dz.dropzone{
  background:#fafafa;
  border:2px dashed #bbb;
  border-radius:18px;
  min-height:140px;
  padding:12px;
}

#ddpb_dz.dropzone .dz-message{
  font-weight:900;
  color:#444;
}

#ddpb_dz.dropzone .dz-preview{
  border-radius:16px;
  overflow:hidden;
}

#ddpb_dz.dropzone .dz-image{
  border-radius:16px;
}

#ddpb_dz.dropzone .dz-remove{
  font-weight:900;
}

/* Gallery thumbnails */
.ddpb-gallery{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
}

@media (max-width:1100px){
  .ddpb-gallery{grid-template-columns:repeat(4,1fr)}
}

@media (max-width:680px){
  .ddpb-gallery{grid-template-columns:repeat(2,1fr)}
}

.ddpb-thumb{
  border:1px solid #e8e9ee;
  border-radius:0px;
  overflow:hidden;
  background:#fafafa;
  position:relative;
  box-shadow:0 8px 18px rgba(0,0,0,.05);
}

.ddpb-thumb img{
  width:100%;
  height:150px;
  object-fit:cover;
  object-position:center center;
  display:block;
  background:#fff;
}

.ddpb-del{
  position:absolute;
  top:10px;
  left:10px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  cursor:pointer;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Processing screen */
.ddpb-processing{
  text-align:center;
  padding:18px;
}

.ddpb-spinner{
  margin:0 auto 14px;
  width:72px;
  height:72px;
  border-radius:999px;
  border:6px solid #eee;
  border-top-color:#00b39b;
  animation:ddpbspin 1s linear infinite;
}

.ddpb-processing-title{
  font-weight:900;
  font-size:18px;
}

.ddpb-processing-sub{
  opacity:.75;
  margin-top:6px;
}

.ddpb-prog{
  margin-top:14px;
  font-weight:900;
}

.ddpb-bar{
  margin-top:10px;
  height:10px;
  background:#eee;
  border-radius:999px;
  overflow:hidden;
}

.ddpb-bar-inner{
  height:10px;
  width:0%;
  background:#00b39b;
}

@keyframes ddpbspin{
  to{transform:rotate(360deg)}
}

/* Price bar */
.ddpb-pricebar{
  margin:10px 0 14px;
  padding:12px 14px;
  border:1px solid #e8e9ee;
  background:#fafafa;
  font-size:14px;
}

/* Pages layout: Desktop 2 per row, Mobile 1 per row */
.ddpb-pages-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}

@media (max-width:820px){
  .ddpb-pages-grid{grid-template-columns:1fr}
}

/* Page card */
.ddpb-page-card{
  border:1px solid #c9c9c9;
  border-radius:0px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}

.ddpb-page-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  background:#fbfbfd;
  border-bottom:1px solid #e8e9ee;
}

.ddpb-page-title{
  font-size:14px;
}

.ddpb-page-tools{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ddpb-tool{
  padding:6px 10px;
  border:1px solid #000000;
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  min-width:34px;
  text-align:center;
}

.ddpb-tool:hover{border-color:#dcdde4}
.ddpb-tool:disabled{opacity:.35;cursor:not-allowed}
.ddpb-tool.danger{border-color:rgba(220,38,38,.25)}

/* Modal (Pick) */
.ddpb-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
}

.ddpb-modal-box{
  width:min(980px,94vw);
  background:#fff;
  border-radius:18px;
  padding:18px;
  text-align:right;
  box-shadow:0 30px 70px rgba(0,0,0,.25);
}

.ddpb-modal-title{
  font-weight:900;
  font-size:16px;
  margin-bottom:10px;
}

.ddpb-pick-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:10px;
  max-height:60vh;
  overflow:auto;
  padding:6px;
  border:1px solid #e8e9ee;
  border-radius:14px;
  background:#fafafa;
}

@media (max-width:640px){
  .ddpb-pick-grid{grid-template-columns:repeat(2,1fr)}
}

.ddpb-pick-item{
  border:1px solid #e8e9ee;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  cursor:pointer;
}

.ddpb-pick-item:hover{
  box-shadow:0 10px 20px rgba(0,0,0,.08);
}

.ddpb-pick-item img{
  width:100%;
  height:120px;
  object-fit:cover;
  object-position:center center;
  display:block;
  background:#fff;
}

.ddpb-pick-usage{
  position:absolute;
  top:8px;
  left:8px;
  z-index:3;
  min-width:34px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(17,24,39,.82);
  color:#fff;
  font-size:12px;
  font-weight:900;
  line-height:1;
  text-align:center;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  pointer-events:none;
}

.ddpb-pick-usage.is-duplicate{
  background:rgba(220,38,38,.9);
}

.ddpb-modal-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}

/* Count line */
.ddpb-count{
  margin:10px 0 0;
  font-weight:900;
  opacity:.75;
}

/* Pending overlay (upload progress) */
.ddpb-pending{position:relative}
.ddpb-pending::after{content:"";position:absolute;inset:0;background:rgba(255,255,255,.55)}

.ddpb-pending-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  z-index:2;
  font-weight:900;
}

.ddpb-pending-bar{
  width:70%;
  height:8px;
  background:#eee;
  border-radius:999px;
  overflow:hidden;
}
.ddpb-pending-bar > div{
  height:8px;
  width:0%;
  background:#00b39b;
}

.ddpb-pending-txt{font-size:12px;opacity:.85}
.ddpb-pending-err{color:#b00020;font-size:12px}

/* Albums box */
.ddpb-albums-wrap{
  margin:10px 0 14px;
  padding:12px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
}

.ddpb-albums-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.ddpb-albums-title{font-weight:900}
.ddpb-albums-status{font-weight:900;font-size:12px;opacity:.7}

.ddpb-albums-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}

.ddpb-albums-select{
  min-width:240px;
  padding:10px;
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
}
@media (max-width: 768px){
  .ddpb-gridwrap{
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

  }

  .ddpb-gridwrap .grid-stack{
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}
/* GridStack inside page */
.ddpb-gridwrap{
  padding:0px;
  background:transparent;
  border:1px solid #e8e9ee;
  border-radius:0px;
  overflow:hidden;
  position:relative;
  width:100%;
}

.ddpb-gridwrap .grid-stack{
  background:transparent;
  width:100%;
  height:100%;
}

.ddpb-gridwrap .grid-stack-item,
.ddpb-gridwrap .grid-stack-item-content{
  background:transparent;
}

.ddpb-gridwrap .grid-stack-item-content{
  border:1px dashed rgba(17,24,39,.18);
  border-radius:0px;
  overflow:hidden;
  position:relative;
}

.ddpb-grid-item-img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
  background:transparent;
}

.ddpb-grid-empty{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  opacity:.6;
  background:transparent;
}

.ddpb-grid-action{
  position:absolute;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  box-shadow:0 8px 16px rgba(0,0,0,.08);
  z-index:5;
}
.ddpb-gridwrap .grid-stack{
  height: 100% !important;
  min-height: 100% !important;
}
.ddpb-gs-spacer{
  visibility: hidden !important;
}

/* ===== Cropper (Edit Image) ===== */
.ddpb-crop-bg{width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;}
.ddpb-photo-cover{width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:cover;display:block;background-color:transparent;}
.ddpb-zoom-wrap{position:relative;width:100%;height:100%;overflow:hidden;background:transparent;}

.ddpb-edit-box{width:min(980px,94vw);}
.ddpb-edit-body{display:flex;flex-direction:column;gap:12px;}
.ddpb-edit-canvas{width:100%;max-height:60vh;overflow:hidden;border:1px solid #e8e9ee;border-radius:14px;background:#fafafa;}
.ddpb-edit-canvas img{max-width:100%;display:block;}
.ddpb-edit-tools{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.ddpb-edit-tool{padding:8px 12px;border-radius:12px;}

@media (max-width:640px){
  .ddpb-edit-canvas{max-height:55vh;}
}



/* ===== CropperJS modal click-fix (no overlay over buttons) ===== */
.ddpb-edit-body{ position:relative; }
.ddpb-edit-canvas{
  position:relative;
  width:100%;
  height:60vh;          /* fixed height so cropper can't overflow and cover buttons */
  max-height:none;      /* override previous max-height approach */
  overflow:hidden;
  border:1px solid #e8e9ee;
  border-radius:14px;
  background:#fafafa;
  z-index:1;
}
@media (max-width:640px){
  .ddpb-edit-canvas{ height:55vh; }
}
.ddpb-edit-canvas img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ddpb-edit-canvas .cropper-container{
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
}
.ddpb-edit-tools,
.ddpb-modal-actions{
  position:relative;
  z-index:50; /* above cropper overlay */
}



/* ===== CropperJS HARD clickability fix ===== */
.ddpb-edit-box{ position:relative; }
.ddpb-edit-body{ position:relative; display:flex; flex-direction:column; gap:10px; }

.ddpb-edit-canvas{ isolation:isolate; } /* new stacking context */
.ddpb-edit-canvas .cropper-container,
.ddpb-edit-canvas .cropper-wrap-box,
.ddpb-edit-canvas .cropper-canvas,
.ddpb-edit-canvas .cropper-drag-box,
.ddpb-edit-canvas .cropper-crop-box{
  z-index:1 !important;
}

.ddpb-edit-tools,
.ddpb-modal-actions{
  position:relative !important;
  z-index:9999 !important;
}


/* ===== PRO Canva-like UI ===== */
.ddpb-pro-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #e8e9ee;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#fafcff 100%);
  box-shadow:0 10px 24px rgba(0,0,0,.05);
}
.ddpb-pro-toolbar-left,
.ddpb-pro-toolbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.ddpb-pro-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:#111827;
  color:#fff;
  font-weight:900;
  font-size:12px;
}

.ddpb-pro-status{min-height:20px;font-size:12px;font-weight:800;color:#6b7280;}


.ddpb-page-title{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ddpb-page-inline-auto{
  appearance:none;
  border:1px solid rgba(99,102,241,.22);
  background:#fff;
  color:#374151;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  line-height:1;
}
.ddpb-page-inline-auto:hover{
  border-color:rgba(99,102,241,.4);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

.ddpb-btn-print{border-color:#1d4ed8;color:#fff;font-weight:800;}
.ddpb-btn-print:hover{background:#eff6ff;}


/* ===== Print Preview Mode ===== */
.ddpb-preview-guides{display:none;position:absolute;inset:0;pointer-events:none;z-index:8;}
#ddpb_root.ddpb-print-preview-mode .ddpb-preview-guides{display:block;}
.ddpb-preview-trim,
.ddpb-preview-safe{position:absolute;pointer-events:none;}
.ddpb-preview-trim{border:1px solid rgba(0,0,0,.25);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);}
.ddpb-preview-safe{border:1px dashed rgba(220,38,38,.55);}
.ddpb-preview-cropmark{position:absolute;pointer-events:none;}
.ddpb-preview-cropmark::before,
.ddpb-preview-cropmark::after{content:'';position:absolute;background:rgba(0,0,0,.55);}
.ddpb-preview-cropmark-tl{left:0;top:0;right:0;bottom:0;}
.ddpb-preview-cropmark-tr{left:0;top:0;right:0;bottom:0;}
.ddpb-preview-cropmark-bl{left:0;top:0;right:0;bottom:0;}
.ddpb-preview-cropmark-br{left:0;top:0;right:0;bottom:0;}
.ddpb-preview-cropmark-tl::before{left:calc(var(--bleed-x) - 16px);top:var(--bleed-y);width:12px;height:1px;}
.ddpb-preview-cropmark-tl::after{left:var(--bleed-x);top:calc(var(--bleed-y) - 16px);width:1px;height:12px;}
.ddpb-preview-cropmark-tr::before{right:calc(var(--bleed-x) - 16px);top:var(--bleed-y);width:12px;height:1px;}
.ddpb-preview-cropmark-tr::after{right:var(--bleed-x);top:calc(var(--bleed-y) - 16px);width:1px;height:12px;}
.ddpb-preview-cropmark-bl::before{left:calc(var(--bleed-x) - 16px);bottom:var(--bleed-y);width:12px;height:1px;}
.ddpb-preview-cropmark-bl::after{left:var(--bleed-x);bottom:calc(var(--bleed-y) - 16px);width:1px;height:12px;}
.ddpb-preview-cropmark-br::before{right:calc(var(--bleed-x) - 16px);bottom:var(--bleed-y);width:12px;height:1px;}
.ddpb-preview-cropmark-br::after{right:var(--bleed-x);bottom:calc(var(--bleed-y) - 16px);width:1px;height:12px;}
#ddpb_root.ddpb-print-preview-mode .ddpb-gridwrap{background:#f7f7f7;}
#ddpb_root.ddpb-print-preview-mode .ddpb-page-card{box-shadow:0 0 0 1px rgba(0,0,0,.06),0 12px 28px rgba(0,0,0,.08);}


.ddpb-photo-drag-surface{
  cursor: grab;
}

.ddpb-photo-drag-surface:active{
  cursor: grabbing;
}

.ddpb-slot-dragging{
  opacity: .7;
}

.ddpb-slot-swap-over{
  outline: 3px dashed #00b39b;
  outline-offset: -3px;
}


/* === Mobile: hide GridStack resize arrows until the user selects a photo/slot === */
@media (max-width: 768px){
  .ddpb-gridwrap .grid-stack-item > .ui-resizable-handle,
  .ddpb-gridwrap .grid-stack-item > .grid-stack-item-resize-handle{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }

  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .ui-resizable-handle,
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .grid-stack-item-resize-handle,
  .ddpb-page-card.ddpb-page-active .grid-stack-item.ddpb-slot-active > .ui-resizable-handle,
  .ddpb-page-card.ddpb-page-active .grid-stack-item.ddpb-slot-active > .grid-stack-item-resize-handle{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }
}

/* ===== Mobile exact photobook page ratio fix =====
   Height is controlled from JS using the real product/print ratio.
   This overrides older mobile height:auto!important rules. */
@media (max-width: 768px){
  .ddpb-gridwrap[data-ddpb-fixed-h]{
    height: var(--ddpb-page-h) !important;
    min-height: var(--ddpb-page-h) !important;
    max-height: var(--ddpb-page-h) !important;
  }
  .ddpb-gridwrap[data-ddpb-fixed-h] > .grid-stack{
    height: var(--ddpb-page-h) !important;
    min-height: var(--ddpb-page-h) !important;
    max-height: var(--ddpb-page-h) !important;
  }
}


/* Rotate uploaded photos already in the first gallery step */
.ddpb-thumb img,
.ddpb-pick-item img{
  transition:transform .18s ease;
}

.ddpb-rotate{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  cursor:pointer;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:3;
  line-height:1;
}

.ddpb-rotate:hover,
.ddpb-del:hover{
  background:#fff;
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}

/* ✅ Cover page: the cover photo must be exactly half of the spread */
.ddpb-page-card.ddpb-cover-card .ddpb-gridwrap .grid-stack-item[gs-id="s0"] > .grid-stack-item-content{
  border-radius:0;
}
.ddpb-page-card.ddpb-cover-card .ddpb-gridwrap .grid-stack-item[gs-id="s0"] .ddpb-zoom-wrap,
.ddpb-page-card.ddpb-cover-card .ddpb-gridwrap .grid-stack-item[gs-id="s0"] .ddpb-photo-cover{
  width:100%;
  height:100%;
}
.ddpb-page-card.ddpb-cover-card .ddpb-gridwrap .grid-stack-item[gs-id="s0"] > .ui-resizable-handle,
.ddpb-page-card.ddpb-cover-card .ddpb-gridwrap .grid-stack-item[gs-id="s0"] > .grid-stack-item-resize-handle{

}

/* DD patch: free draggable text overlay */
.ddpb-text-draggable{
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  z-index: 7;
  border-radius: 10px;
  width:max-content;
  min-width:min(160px, calc(100% - 18px));
  max-width:calc(100% - 18px);
  overflow-wrap:break-word;
  word-break:normal;
}
.ddpb-grid-content.ddpb-selected .ddpb-text-draggable,
.ddpb-text-draggable:hover{
  outline: 1px dashed rgba(25, 118, 210, .65);
  background: rgba(255,255,255,.14);
}


/* v1.3.5: כפתורי סדר / רקע / מסגרת בסוף כל עמוד */
.ddpb-page-bottom-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 12px 12px;
  background:#fbfbfd;
  border-top:1px solid #e8e9ee;
}
.ddpb-page-bottom-actions .ddpb-tool{
  min-width:72px;
}
@media (max-width:700px){
  .ddpb-page-bottom-actions{
    justify-content:center;
  }
  .ddpb-page-bottom-actions .ddpb-tool{
    flex:1 1 auto;
  }
}


/* v1.3.7: allow dragging the cover slot itself with GridStack */
.ddpb-page-card.ddpb-cover-card .ddpb-cover-slot-move-handle{
  cursor: move;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.ddpb-page-card.ddpb-cover-card .grid-stack-item.ui-draggable-dragging .ddpb-cover-slot-move-handle,
.ddpb-page-card.ddpb-cover-card .grid-stack-item.grid-stack-item-moving .ddpb-cover-slot-move-handle{
  cursor: grabbing;
}

/* v1.3.8: reliable direct cover-slot dragging */
.ddpb-page-card.ddpb-cover-card .ddpb-cover-slot-move-handle.is-cover-slot-dragging{
  cursor: grabbing !important;
}
.ddpb-page-card.ddpb-cover-card .ddpb-cover-slot-move-handle .ddpb-zoom-wrap,
.ddpb-page-card.ddpb-cover-card .ddpb-cover-slot-move-handle .ddpb-grid-item-img{
  pointer-events: none;
}
.ddpb-page-card.ddpb-cover-card .ddpb-cover-slot-move-handle .ddpb-text-draggable{
  pointer-events: auto;
}


/* Loading an existing album from the server */
#ddpb-server-loading,
#ddpb-ai-processing{
  position:fixed;
  inset:0;
  z-index:2147483000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  opacity:1;
  transition:opacity .2s ease;
}
#ddpb-server-loading.ddpb-server-loading--hide,
#ddpb-ai-processing.ddpb-server-loading--hide{opacity:0;pointer-events:none}
.ddpb-server-loading__card{
  direction:rtl;
  min-width:min(390px,calc(100vw - 40px));
  padding:28px 30px;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 55px rgba(15,23,42,.16);
  text-align:center;
}
.ddpb-server-loading__spinner{
  display:block;
  width:46px;
  height:46px;
  margin:0 auto 16px;
  border:5px solid #dbeafe;
  border-top-color:#087ccb;
  border-radius:50%;
  animation:ddpbServerSpin .8s linear infinite;
}
.ddpb-server-loading__title{font-size:22px;font-weight:900;color:#111827}
.ddpb-server-loading__text{margin-top:7px;font-size:14px;font-weight:600;color:#6b7280}
.ddpb-ai-processing__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  margin-top:15px;
  padding:7px 14px;
  border-radius:999px;
  background:#eff6ff;
  color:#075985;
  font-size:13px;
  font-weight:900;
}
@keyframes ddpbServerSpin{to{transform:rotate(360deg)}}

/* Pro Design: blurred first-photo background behind each regular album page */
.ddpb-gridwrap > .ddpb-page-ai-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background-repeat:no-repeat;
  background-position:center center;
  background-size:cover;
  pointer-events:none;
  z-index:0;
}
.ddpb-gridwrap > .grid-stack{
  position:relative;
  z-index:1;
}

/* v1.6.4 — rotation handle fully inside the selected photo */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .ddpb-gridwrap .grid-stack-item > .grid-stack-item-content > .ddpb-frame-rotate-handle {
    position: absolute;
    top: 4px;
    left: 4px;
    right: auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #147dcc;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2147483000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }



  /* The selected frame and its handle must stay above overlapping photos/toolbars.
     Only the content container is opened; the actual image remains clipped by its zoom wrapper. */
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active {
    z-index: 2147482000 !important;
    overflow: visible !important;
  }
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .grid-stack-item-content {
    overflow: visible !important;
  }
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .grid-stack-item-content > .ddpb-zoom-wrap,
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .grid-stack-item-content > .ddpb-crop-bg {
    overflow: hidden;
  }

  /* Show only for the exact frame that the customer clicked. */
  .ddpb-gridwrap .grid-stack-item.ddpb-slot-active > .grid-stack-item-content > .ddpb-frame-rotate-handle {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .ddpb-gridwrap .grid-stack-item > .grid-stack-item-content > .ddpb-frame-rotate-handle:hover {
    transform: scale(1.08);
  }

  .ddpb-gridwrap .grid-stack-item > .grid-stack-item-content > .ddpb-frame-rotate-handle.is-rotating {
    cursor: grabbing;
  }
}


/* WhatsApp gallery compact upload state */
.ddpb-wa-gallery-summary{
  margin:14px 0;
  padding:14px 16px;
  border:1px solid #b8ead0;
  background:#effcf5;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  direction:rtl;
}
.ddpb-wa-gallery-summary-text{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  color:#146c43;
}
.ddpb-wa-gallery-summary-icon{font-size:22px;line-height:1;}
.ddpb-wa-gallery-add{white-space:nowrap;}
@media (max-width:640px){
  .ddpb-wa-gallery-summary{align-items:stretch;flex-direction:column;}
  .ddpb-wa-gallery-add{width:100%;}
}

/* v1.8.9: keep the photo frame thickness fixed while panning/zooming the image. */
.ddpb-photo-viewport{
  position:absolute;
  overflow:hidden;
  box-sizing:border-box;
  pointer-events:auto;
}
.ddpb-photo-viewport > .ddpb-grid-item-img,
.ddpb-photo-viewport > .ddpb-photo-cover,
.ddpb-photo-viewport > .ddpb-crop-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
}

/* v1.9.4: crop-style zoom range 0%-300%; 0% is minimum cover with no empty area. */
