.dp-editor-carousel{position:relative;width:100%;margin:18px 0;overflow:hidden;background:#f3f4f6;border:1px solid #d7dce2;line-height:0;touch-action:pan-y}
.dp-editor-carousel__viewport{position:relative!important;display:block!important;width:100%!important;max-width:100%!important;overflow:hidden!important}
.dp-editor-carousel__track{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;width:100%!important;max-width:100%!important;transform:translate3d(0,0,0);transition:transform .32s ease;will-change:transform}
.dp-editor-carousel__slide{display:flex!important;flex:0 0 100%!important;width:100%!important;min-width:100%!important;max-width:100%!important;align-items:center;justify-content:center;margin:0!important;background:#111827}
.dp-editor-carousel__slide img{display:block!important;width:100%!important;height:auto!important;max-height:720px;object-fit:contain;margin:0!important;border:0!important}
.dp-editor-carousel__prev,.dp-editor-carousel__next{position:absolute;z-index:2;top:50%;display:flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:rgba(15,23,42,.62);color:#fff;font-size:26px;line-height:1;transform:translateY(-50%);cursor:pointer}
.dp-editor-carousel__prev{left:12px}.dp-editor-carousel__next{right:12px}
.dp-editor-carousel__dots{position:absolute;z-index:2;left:50%;bottom:12px;display:flex;gap:8px;transform:translateX(-50%);line-height:1}
.dp-editor-carousel__dot{display:block;width:9px;height:9px;padding:0;border:1px solid rgba(255,255,255,.8);border-radius:50%;background:rgba(15,23,42,.5);cursor:pointer}
.dp-editor-carousel__dot.is-active{background:#fff}
.dp-editor-carousel[data-dp-editor-preview="1"]{outline:1px dashed #94a3b8;outline-offset:3px}
@media(max-width:767px){.dp-editor-carousel{margin:14px 0}.dp-editor-carousel__prev,.dp-editor-carousel__next{width:34px;height:34px;font-size:22px}.dp-editor-carousel__prev{left:8px}.dp-editor-carousel__next{right:8px}.dp-editor-carousel__dots{bottom:8px}.dp-editor-carousel__slide img{max-height:520px}}

/* 編輯器元件模式 */
.note-editor .note-editable .dp-editor-carousel{padding-top:48px;outline:2px solid #64748b;outline-offset:0;line-height:normal}
.note-editor .note-editable .dp-editor-carousel__editor-tools{position:absolute;z-index:8;left:0;right:0;top:0;display:flex;align-items:center;gap:8px;min-height:48px;padding:7px 10px;background:#f8fafc;border-bottom:1px solid #cbd5e1;color:#0f172a;line-height:1.3}
.dp-editor-carousel__editor-tools{display:none!important}
.note-editor .note-editable .dp-editor-carousel__editor-tools{display:flex!important}
.dp-editor-carousel__editor-label{font-weight:700;margin-right:auto}
.dp-editor-carousel__edit,.dp-editor-carousel__remove{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px 10px;border:1px solid #94a3b8;background:#fff;color:#0f172a;cursor:pointer}
.dp-editor-carousel__remove{width:36px;padding:6px}
.dp-editor-carousel--hide-arrows .dp-editor-carousel__prev,.dp-editor-carousel--hide-arrows .dp-editor-carousel__next{display:none!important}
.dp-editor-carousel--hide-dots .dp-editor-carousel__dots{display:none!important}
.dp-carousel-modal{position:fixed;z-index:999999;inset:0;display:none}
.dp-carousel-modal.is-open{display:block}
.dp-carousel-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.66)}
.dp-carousel-modal__panel{position:absolute;left:50%;top:50%;width:min(760px,calc(100vw - 24px));max-height:calc(100vh - 24px);display:flex;flex-direction:column;transform:translate(-50%,-50%);background:#fff;border:1px solid #64748b;box-shadow:0 24px 80px rgba(0,0,0,.3);color:#111827}
.dp-carousel-modal__head,.dp-carousel-modal__foot{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #d1d5db}
.dp-carousel-modal__head strong{font-size:18px}.dp-carousel-modal__close{margin-left:auto;width:36px;height:36px;border:1px solid #9ca3af;background:#fff;font-size:26px;line-height:1;cursor:pointer}
.dp-carousel-modal__body{padding:14px 16px;overflow:auto}.dp-carousel-modal__list{display:grid;gap:10px}
.dp-carousel-modal__item{display:grid;grid-template-columns:28px 84px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px;border:1px solid #d1d5db;background:#f8fafc}
.dp-carousel-modal__item img{width:84px;height:58px;object-fit:cover;border:1px solid #cbd5e1}.dp-carousel-modal__item input{width:100%;min-height:38px;border:1px solid #9ca3af;padding:7px 9px}
.dp-carousel-modal__actions{display:flex;gap:4px}.dp-carousel-modal__actions button{width:34px;height:34px;border:1px solid #9ca3af;background:#fff;cursor:pointer}
.dp-carousel-modal__add{width:100%;margin-top:12px;padding:10px;border:1px dashed #64748b;background:#f8fafc;font-weight:700;cursor:pointer}
.dp-carousel-modal__settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px;padding:12px;border:1px solid #d1d5db;background:#f8fafc}.dp-carousel-modal__settings label{display:flex;align-items:center;gap:7px}.dp-carousel-modal__settings input[type="number"]{width:100px;padding:5px}
.dp-carousel-modal__foot{justify-content:flex-end;border-top:1px solid #d1d5db;border-bottom:0}.dp-carousel-modal__foot button{min-width:100px;padding:9px 14px;border:1px solid #64748b;background:#fff;cursor:pointer}.dp-carousel-modal__save{background:#0f172a!important;color:#fff}
@media(max-width:600px){.note-editor .note-editable .dp-editor-carousel{padding-top:88px}.note-editor .note-editable .dp-editor-carousel__editor-tools{flex-wrap:wrap}.dp-editor-carousel__editor-label{flex:1 0 100%}.dp-carousel-modal__item{grid-template-columns:24px 64px minmax(0,1fr)}.dp-carousel-modal__item img{width:64px;height:50px}.dp-carousel-modal__actions{grid-column:2/4;justify-content:flex-end}.dp-carousel-modal__settings{grid-template-columns:1fr}.dp-carousel-modal__panel{max-height:calc(100vh - 12px)}}

/* Frontend isolation: editor-only controls must never render in published content. */
body:not(.wp-admin) .dp-editor-carousel__editor-tools{display:none!important}
body:not(.wp-admin) .dp-editor-carousel{box-sizing:border-box!important;clear:both!important;max-width:100%!important;border:0!important;border-radius:0!important}
body:not(.wp-admin) .dp-editor-carousel__viewport,body:not(.wp-admin) .dp-editor-carousel__track,body:not(.wp-admin) .dp-editor-carousel__slide{box-sizing:border-box!important}
body:not(.wp-admin) .dp-editor-carousel__slide{padding:0!important}
body:not(.wp-admin) .dp-editor-carousel__prev,body:not(.wp-admin) .dp-editor-carousel__next{appearance:none!important;-webkit-appearance:none!important;margin:0!important}
