/* Tana Bana v7.2.9 — universal image URL + drag/drop uploader */
.tb-media-drop{position:relative;margin-top:8px;min-height:86px;border:1.5px dashed rgba(73,58,49,.28);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(247,242,236,.9));display:flex;align-items:center;gap:12px;padding:12px;cursor:pointer;transition:border-color .2s ease,background .2s ease,transform .2s ease,box-shadow .2s ease;outline:none;overflow:hidden}
.tb-media-drop:hover,.tb-media-drop:focus-visible{border-color:rgba(111,76,58,.65);box-shadow:0 10px 26px rgba(55,42,34,.08);transform:translateY(-1px)}
.tb-media-drop.is-dragover{border-color:#8b604f;background:#f2e7de;box-shadow:0 0 0 4px rgba(139,96,79,.08)}
.tb-media-drop.is-busy{opacity:.72;pointer-events:none}
.tb-media-drop.is-success{border-color:#557a60}
.tb-media-drop.is-error{border-color:#a54f4f;background:#fff3f1}
.tb-media-drop__thumb{width:58px;height:66px;flex:0 0 58px;border-radius:10px;background:#ece5dd;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(0,0,0,.06)}
.tb-media-drop__thumb img{width:100%;height:100%;object-fit:cover;display:none}
.tb-media-drop.has-preview .tb-media-drop__thumb img{display:block}
.tb-media-drop.has-preview .tb-media-drop__icon{display:none}
.tb-media-drop__icon{font-size:22px;line-height:1;color:#70584c}
.tb-media-drop__copy{min-width:0;display:flex;flex-direction:column;gap:2px}
.tb-media-drop__copy b{font-size:12px;line-height:1.35;color:#2b2420}
.tb-media-drop__copy small{font-size:10px;line-height:1.45;color:#796f69}
.tb-media-drop__status{font-size:10px!important;color:#6f5347!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tb-media-drop input[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.tb-dd-native-hidden{display:none!important}

/* Variant matrix: compact drop target without making rows huge. */
.tb-dd-variant-wrap{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:5px;align-items:stretch;min-width:0}
.tb-dd-variant-wrap>input[data-vf="image"]{width:100%;min-width:0}
.tb-media-drop--compact{margin:0!important;min-height:0!important;width:38px;height:38px;padding:0!important;border-radius:8px;display:grid;place-items:center;box-shadow:none!important;transform:none!important}
.tb-media-drop--compact .tb-media-drop__thumb,.tb-media-drop--compact .tb-media-drop__copy{display:none}
.tb-media-drop--compact .tb-media-drop__icon{display:block;font-size:16px}
.tb-media-drop--compact.is-dragover{transform:none!important}

/* Gallery uploader can accept multiple files. */
.tb-media-drop--gallery{min-height:96px}
.tb-media-drop--gallery .tb-media-drop__thumb{width:72px;height:72px;flex-basis:72px}

/* Existing file inputs in Hero Studio become clear drop surfaces. */
.banner-studio label.tb-dd-existing-file{border:1.5px dashed rgba(73,58,49,.25);border-radius:12px;padding:10px;background:rgba(255,255,255,.5)}
.banner-studio label.tb-dd-existing-file input[type=file]{margin-top:7px}

/* Dark handler theme */
html[data-admin-theme="dark"] .tb-media-drop{border-color:rgba(236,222,208,.22);background:linear-gradient(180deg,rgba(35,34,33,.96),rgba(27,26,25,.96))}
html[data-admin-theme="dark"] .tb-media-drop:hover,html[data-admin-theme="dark"] .tb-media-drop:focus-visible{border-color:rgba(221,179,147,.66);box-shadow:0 10px 28px rgba(0,0,0,.24)}
html[data-admin-theme="dark"] .tb-media-drop.is-dragover{background:#332924;border-color:#c89473}
html[data-admin-theme="dark"] .tb-media-drop.is-error{background:#3b2828;border-color:#c26c68}
html[data-admin-theme="dark"] .tb-media-drop__thumb{background:#242220;border-color:rgba(255,255,255,.07)}
html[data-admin-theme="dark"] .tb-media-drop__copy b{color:#f4eee8}
html[data-admin-theme="dark"] .tb-media-drop__copy small{color:#b9aea6}
html[data-admin-theme="dark"] .tb-media-drop__status{color:#d3aa8f!important}
html[data-admin-theme="dark"] .tb-media-drop__icon{color:#d4a784}
html[data-admin-theme="dark"] .banner-studio label.tb-dd-existing-file{border-color:rgba(236,222,208,.2);background:rgba(255,255,255,.025)}

@media(max-width:800px){
  .tb-media-drop{min-height:78px;padding:10px;border-radius:12px}
  .tb-media-drop__thumb{width:52px;height:58px;flex-basis:52px}
  .tb-media-drop__copy b{font-size:11px}
  .tb-media-drop__copy small{font-size:9px}
  .tb-dd-variant-wrap{grid-template-columns:minmax(0,1fr) 42px}
  .tb-media-drop--compact{width:42px;height:42px}
}

.banner-studio label.tb-dd-existing-file.is-dragover{border-color:#8b604f;background:#f2e7de}
html[data-admin-theme="dark"] .banner-studio label.tb-dd-existing-file.is-dragover{border-color:#c89473;background:#332924}
