.object-fit-contain {
  object-fit: contain;
}

/* card base */
.creative-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: .15s;
}

.creative-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

/* thumbnail area */
.thumb-area {
  height: 165px;
  background: #f7f7f7;
  position: relative;
}

/* checkbox */
.select-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}

.select-check .form-check-input {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* overlay */
.action-overlay {
  position: absolute;
  inset: 0;
  background: rgba(59,130,246,.45);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s ease;
}

.thumb-area:hover .action-overlay {
  opacity: 1;
}

/* icons group */
.overlay-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* overlay icons look bolder */
.overlay-icon {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

/* hover effect on icons */
.overlay-icon:hover {
  transform: scale(1.25);
  opacity: .85;
}


.divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.65);
}


.card-menu {
  position: absolute;
  min-width: 180px;
  background: #fff;
  border-radius: 8px;
  padding: 4px 0;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  z-index: 9999;
  display: none;
}

.card-menu.show {
  display: block;
}

.card-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

.card-menu-item:hover {
  background: #f2f5ff;
}

.card-menu-item svg {
  flex-shrink: 0;
}

.card-menu-item span {
  flex: 1;
  text-align: left;
}


.tag-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  margin-top: 4px;
  width: 300px;
  display: none;
  z-index: 30;
}

.tag-item {
  padding: 8px 10px;
  cursor: pointer;
}

.tag-item:hover {
  background: #f5f8ff;
}



.tag-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid #ced4da;
 background-color: #fff;
  min-height: 50px;
  cursor: text;
}

.tag-wrapper:focus-within {
  border-color: #4c8dff;
  box-shadow: 0 0 0 2px rgba(76,141,255,.15);
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


.tag-chip i {
  color: #5b6aaa;
}

.tag-chip button {
  border: none;
  background: transparent;
  color: #333;
  padding: 0;
  cursor: pointer;
}

.tag-input {
  border: none !important;
  outline: none;
  flex: 1;
  min-width: 120px;
}

.tag-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  margin-top: 4px;
  width: 300px;
  display: none;
  z-index: 50;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e9ecff;
  padding: 4px 8px 4px 6px;
  font-size: 13px;
}

.tag-chip i {
  color: #4c6ef5;
}

.tag-chip .remove-btn {
  border: none;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.folder-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.folder-modal.hidden {
  display: none;
}

.folder-card {
  width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 12px;
}

.folder-header .icon {
  width: 20px;
  height: 20px;
}

.icon-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
}

.folder-card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 14px;
}

.folder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn.primary {
  background: #2563eb;
  color: #fff;
  border: none;
}

.btn.ghost {
  background: transparent;
  border: 1px solid #ddd;
}

.folder-row{
  position: relative;
}


.folder-actions{
  position:absolute;
  top:8px;
  right:8px;
  display:flex;
  gap:4px;
  opacity:0;
  transform:translateY(-4px);
  transition:.15s ease;
}

.folder-row:hover .folder-actions{
  opacity:1;
  transform:translateY(0);
}

.folder-actions button{
  width:25px;
  height:25px;
  border-radius:5px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(255,255,255,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.folder-actions button:hover{
  background:#fff;
  border-color:rgba(0,0,0,.15);
}

.cal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center; z-index:9999;
}
.cal-modal{
  width:420px; max-width:92vw; background:#fff; border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.2); position:relative; overflow:hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
.cal-header{ padding:22px 22px 10px 22px; }
.cal-header h2{ margin:0; font-size:24px; letter-spacing:-0.5px; }
.cal-header p{ margin:8px 0 0 0; color:#60646c; font-size:14px; }
.cal-close{
  position:absolute; right:14px; top:14px;
  border:none; background:transparent; font-size:14px; cursor:pointer;
  width:36px; height:36px; border-radius:10px;
}
.cal-close:hover{ background:#f3f4f6; }
.cal-card{
  margin:16px 22px 22px 22px; border:1px solid #e6e8eb; border-radius:12px;
  cursor:pointer; background:#fbfbfc;
}
.cal-card-inner{ display:flex; align-items:center; padding:18px; gap:14px; }
.cal-gicon-box{
  width:84px; height:84px; border-radius:16px; background:#e9f1ff;
  display:flex; align-items:center; justify-content:center; font-size:34px;
  color:#2b6cff; font-weight:700;
}
.cal-glabel{
  background:#2f3a4a; color:#fff; padding:10px 12px; border-radius:10px;
  font-weight:600; font-size:14px; width:max-content;
}
.cal-subtext{
  padding:0 18px 18px 18px; color:#7b808a; font-size:14px;
}
.cal-step2{ padding:0 22px 22px 22px; }
.cal-label{ display:block; margin:10px 0 6px; color:#444; font-weight:600; }
.cal-select{
  width:100%; padding:10px 12px; border:1px solid #d9dce1; border-radius:5px;
  font-size:16px; background:#fff; height: 40px;
}
.cal-import{
  margin-top:14px; width:100%; padding:12px 14px;
  border:none; border-radius:5px; background:#111827; color:#fff;
  font-size:14px; font-weight:700; cursor:pointer;
}
.cal-import:hover{ opacity:.92; }
.cal-status{ margin-top:10px; font-size:12px; color:#495057; min-height:18px; }



.cal-source-box{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px;
  margin-bottom:14px;
  background:#fff;
}
.cal-source-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.cal-source-left{
  display:flex;
  gap:12px;
  align-items:center;
}
.cal-source-icon{
  width:36px;
  height:36px;
  border-radius:10px;
  background:#e9f1ff;
  color:#2563eb;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.cal-source-title{
  font-weight:600;
  font-size:15px;
}
.cal-source-sub{
  font-size:13px;
  color:#6b7280;
}
.cal-source-edit{
  color:#2563eb;
  font-weight:600;
  cursor:pointer;
  font-size:14px;
}
.cal-source-icon svg{
  width: 100%;
  height: 100%;
  display: block;
}

 .mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 12px;
}

.mc-card {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background:#f8f8f8;
  cursor: pointer;
  transition:.15s;
}

.mc-card:hover {
  box-shadow:0 10px 25px rgba(0,0,0,.1);
  transform:translateY(-2px);
}

.mc-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background:#eee;
}

.mc-thumb img,
.mc-thumb video {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.mc-audio {
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#555;
  font-size:13px;
}

.mc-hover {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;            /* center vertically */
  justify-content:center;        /* center horizontally */
  padding:10px;
  opacity:0;
  pointer-events:none;
  background:linear-gradient(to top, rgba(0,0,0,.45), transparent);
  transition:.15s;
}

.mc-card:hover .mc-hover {
  opacity:1;
  pointer-events:auto;
}

/* button style */
.mc-insert {
  background: none;
  color: #dededeff;
  border:0;
  border-radius:999px;
  padding:6px 12px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:18px;
  cursor:pointer;
}

.mc-insert svg {
  flex-shrink:0;
}
 .creative-eye {
  color: #9aa0a6; /* grey */
  display: inline-flex;
  align-items: center;
}


/* GRID */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
}

/* CARD */
.creative-template-card {
  position: relative;
}

/* THUMB */
.creative-thumb {
  position: relative;
  height: 130px;
  border-radius: 5px;
  overflow: hidden;
  background: #eee;
}

.creative-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RED BADGE */
.creative-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: #d32f2f;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-bottom-right-radius: 14px;
}

/* BLUE CORNER */
.creative-corner {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: #3b82f6;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* OVERLAY */
.creative-overlay {
  position: absolute;
  inset: 0;
  background: rgba(70, 130, 255, 0.78);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creative-template-card:hover .creative-overlay {
  opacity: 1;
}

.creative-overlay-inner {
  text-align: center;
  color: #fff;
}

.creative-plus {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 300;
  margin: 0 auto 10px;
}

.creative-text {
  font-size: 10px;
  font-weight: 600;
}

/* META */
.creative-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.creative-title {
  font-size: 10px;
  font-weight: 500;
  color: #2b2b2b;
}

.creative-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 8px;
  color: #7a7a7a;
}

/* CLICK LAYER */
.creative-click {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}


  .mc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 5px;
  background: #f4f5f7;
  border: 1px solid #e0e0e0;
  color: #333;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

.mc-back-btn:hover {
  background: #ececff;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.mc-back-btn svg {
  flex-shrink: 0;
}

/* CATEGORY GRID */
.mc-category-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 10px;
}

.mc-category-card {
  cursor: pointer;
  text-align: center;
}

.mc-category-thumb {
  height: 50px;
  border-radius: 5px;
  background: linear-gradient(135deg, #e3f2fd, #ede7f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #555;
}

.mc-category-name {
  margin-top: 8px;
  font-size: 12px;
}

.mc-category-card:hover .mc-category-thumb {
  background: linear-gradient(135deg, #e6ddff, #ddd2ff);
}

    .hidden-input{
    display:none !important;
    opacity:0;
    pointer-events:none;
    position:absolute;
    left:-9999px;
}

    .upload-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.upload-btn{
    background:#7b3ff2;
    color:white;
    border:none;
    padding:14px 30px;
    font-size:16px;
    border-radius:14px;
    cursor:pointer;
    font-weight:600;
}

.dots-btn{
    width:42px;
    height:38px;
    border-radius:5px;
    border:none;
    background:#7b3ff2;
    color:white;
    font-size:26px;
    cursor:pointer;
}

.menu-wrapper{
    position:relative;
}

.upload-menu{
    position:absolute;
    top:60px;
    right:0;
    background:white;
    width:220px;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
    display:none;
    overflow:hidden;
    z-index:9999;
}

.menu-item{
    padding:16px;
    display:flex;
    align-items:center;
    gap:12px;
    cursor:pointer;
    font-weight:600;
}

.menu-item:hover{
    background:#f2f2f2;
}

.gdrive-icon{
    width:24px;
}

    .media-search {
  margin-bottom: 10px;
}

#mediaSearch {
  width: 100%;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

#mediaSearch:focus {
  outline: none;
  border-color: #7c3aed;
}


  #mediaGridWrap {
  position: relative;
}

#mediaDropOverlay {
  position: absolute;
  inset: 0;                 /* fills only the wrapper */
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  z-index: 20;
}

#mediaDropOverlay.active {
  display: flex;
}

/* FOLDER ROW LIST STYLE */
/* FOLDER LIST VIEW */

#mediaGrid.folders-view {
  display: block !important;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 10px;
  cursor: pointer;
}

.folder-row:hover {
  background: #fafafa;
}

.folder-row.create {
  border: 2px dashed #ddd;
  background: transparent;
  box-shadow: none;
}

.folder-row .thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #f1f1f1;
  background-size: cover;
  background-position: center;
}

.folder-row .create-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #777;
}

.folder-row .info .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.folder-row .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: #666;
}

.folder-row .badge.lock {
  padding: 2px 8px;
  border-radius: 2px;
  background: #eee;
  color: #707070;
font-size: 10px;
font-weight: 500;
}

.badge.lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge.lock svg {
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid #ddd;
  font-size: 12px;
}

.search-input:focus {
  outline: none;
  border-color: #7c3aed;
}
    
    .url-box {
  margin-bottom: 5px;
}

.url-label {
  font-size: 12px;
  margin-bottom: 4px;
  display:block;
}

.url-row {
  display: flex;
  gap: 6px;
}

.url-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid #ddd;
  font-size: 12px;
}

.url-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.url-btn {
  background:#7c3aed;
  border:0;
  border-radius:5px;
  width:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;

  transition:.15s;
}

.url-btn:hover {
  background:#6a2bdc;
}

.url-btn:active {
  transform:scale(.96);
}

    .upload-btn {
  width: 100%;
  background: #7c3aed;          /* purple */
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, transform .1s;
}

.upload-btn:hover {
  background: #6a2bdc;
}

.upload-btn:active {
  transform: scale(.98);
}

.upload-box {
  margin-bottom: 10px;
}

    .media-tabs {
  display:flex;
  gap:10px;
  margin-bottom:10px;
  font-size:12px;
}

.media-tabs button {
  background:transparent;
  border:0;
  cursor:pointer;
  padding-bottom:6px;
}

.media-tabs button.active {
  font-weight:600;
  color:#5a3df0;
  border-bottom:3px solid #5a3df0;
}

#mediaGridWrap {
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* 3 equal columns */
#mediaGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* base card style */
.media-card {
  background:#fff;
  border-radius:5px;
  overflow:hidden;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  transition:transform .15s, box-shadow .15s;
}

.media-card:hover {
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(0,0,0,.12);
}

/* mini thumbnail cards in the grid */
.media-card.mini {
  /* IMPORTANT: let grid control position & width */
  position: relative;
  width: 100%;
}

/* keep ALL cards same height */
.media-card.mini .thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 150%;      /* 150% = tall 9:16 poster style; tweak if needed */
}

.media-card.mini .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}



/* 3 dots button */
.media-menu-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  background: rgba(0,0,0,.55);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  cursor: pointer;
}

.media-card.mini:hover .media-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Context menu */
.media-context {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 25px 50px rgba(0,0,0,.12);
  width: 260px;
  padding: 10px 0;
  z-index: 5000;
}

.media-context .mc-head {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.media-context .mc-head strong {
  font-size: 14px;
}

.media-context .mc-head small {
  display: block;
  color: #7a7a7a;
  font-size: 11px;
}

.media-context .mc-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
}

.media-context .mc-item:hover {
  background: #f5f5f5;
}

.media-context .mc-item.danger {
  color: #c81e1e;
}
.media-context {
 
  position: fixed !important;
  margin: 0 !important;
}


@keyframes menuPop {
  from {
    transform: scale(.9) translateX(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
}
.move-popup {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:7000;
}

.mp-panel {
  background:#fff;
  width:520px;
  border-radius:16px;
  padding:14px 18px;
  box-shadow:0 25px 60px rgba(0,0,0,.25);
}

.mp-header {
  font-size:16px;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.mp-header span {
  font-weight:400;
}

.mp-close {
  background:transparent;
  border:0;
  font-size:20px;
  cursor:pointer;
}

.mp-current {
  font-size:12px;
  margin-bottom:8px;
}

.mp-current .badge {
  padding:4px 8px;
  background:#f5f5f5;
  border-radius:8px;
  color: #585858ff;
}

.mp-search input {
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #ddd;
  margin-bottom:10px;
}

.mp-list {
  max-height:260px;
  overflow:auto;
  margin-bottom:8px;
}

.mp-row {
  display:flex;
  align-items:center;
  padding:8px;
  border-radius:10px;
  cursor:pointer;
}

.mp-row:hover {
  background:#f6f6f6;
}

.mp-row.active {
  background:#eef3ff;
}

.mp-row .thumb {
  width:40px;
  height:40px;
  border-radius:6px;
  background:#eaeaea;
  background-size:cover;
  background-position:center;
  margin-right:10px;
}

.mp-row .thumb.root {
  background:#f3f3f3;
}

.mp-row .info .name {
  font-size:13px;
}

.mp-row .info .count {
  font-size:11px;
  color:#777;
}

.mp-warning {
  background:#fff3cd;
  color:#6c5717;
  padding:6px 10px;
  border-radius:8px;
  margin-bottom:8px;
}

.mp-create {
  font-size:13px;
  color:#0d6efd;
  cursor:pointer;
  margin:6px 0;
}

.mp-footer {
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.btn {
  border:1px solid #ddd;
  border-radius:8px;
  padding:6px 10px;
}

.btn.primary {
  background:#0d6efd;
  color:#fff;
}

.btn.primary:disabled {
  opacity:.4;
}

.mc-head-row {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.mc-head-row .title {
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:600;
}

.file-name {
  font-size:14px;
}

.rename-btn {
  background:transparent;
  border:0;
  cursor:pointer;
}

.meta {
  font-size:11px;
  color:#777;
  margin-top:2px;
}

.mc-menu .mc-item {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  cursor:pointer;
}

.mc-menu .mc-item:hover {
  background:#f6f6f6;
}

.mc-menu .icon {
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.mc-item.danger {
  color:#c81e1e;
}
.details-panel-wrap {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.25);
  display:flex;
  justify-content:flex-end;
  z-index:7000;
}

.details-panel {
  width:340px;
  background:#fff;
  height:100%;
  padding:14px;
  box-shadow:-10px 0 25px rgba(0,0,0,.15);
  display:flex;
  flex-direction:column;
  animation:slideIn .25s ease;
}
.details-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;      /* prevents content from spilling out */
}

.dp-preview {
  width: 100%;
  max-height: 260px;     /* you can tune this */
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.dp-preview img,
.dp-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* keeps aspect ratio correctly */
  display: block;
  background: #fafafa;
}

/* content below preview becomes scrollable */
.details-panel {
  overflow-y: auto;
}


@keyframes slideIn {
  from { transform:translateX(40px); opacity:0; }
  to { transform:translateX(0); opacity:1; }
}

.dp-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:16px;
  margin-bottom:10px;
}

.dp-close {
  background:transparent;
  border:0;
  font-size:20px;
  cursor:pointer;
}


.dp-section {
  margin:10px 0;
}

.dp-section label {
  font-size:12px;
  color:#777;
}

.dp-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.dp-actions {
  margin-top:auto;
  display:flex;
  gap:8px;
}

.dp-actions .btn {
  flex:1;
}

.btn {
  border:1px solid #ddd;
  padding:8px 10px;
  border-radius:8px;
}

.btn.danger {
  background:#ffe5e5;
  color:#c00;
}
.dp-icon-btn {
  background:transparent;
  border:0;
  cursor:pointer;
  padding:4px;
  border-radius:6px;
}

.dp-icon-btn:hover {
  background:#f3f3f3;
}

.dp-actions button svg {
  margin-right:6px;
}
button.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mp-badge-folder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-badge-folder svg {
  flex-shrink: 0;
}

.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 120px;
  margin-bottom: 5px;
  margin-top: 5px;
  
}

.save-btn:hover:not(:disabled) {
  background: #0a53ad;
}

.save-btn:disabled {
  opacity: .75;
  cursor: not-allowed;
}

/* Spinner */
.save-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

#jsonInput {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
}



#app-loader {
  position: fixed;
  inset: 0;
  background: #f3f4f600; /* light neutral like Adobe */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
}
.loader-window {
  width: 800px;
  height: 450px;
  background: #ffffff;
  display: flex;
  box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  border-radius: 6px;
  overflow: hidden;
}


/* LEFT PANEL */
/* LEFT PANEL */
.loader-left {
  width: 42%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* RIGHT PANEL */
.loader-right {
  width: 58%;
  overflow: hidden;
}

.loader-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* LOGO */
.brand img {
  height: 42px;
  margin-bottom: 12px;
}

.brand h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  margin-top: 16px;
  color: #555;
}

/* PROGRESS BAR */
.progress {
  width: 100%;
  height: 6px;
  background: #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 24px;
}

.progress .bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  animation: loading 2.5s ease-in-out infinite;
}

@keyframes loading {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.footer {
  font-size: 12px;
  color: #888;
}

/* ARTWORK */
.loader-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
