/* Media archive management controls and staff editor. */
.tfld-media-manage [hidden]{display:none!important;}
.tfld-media-v2-groups[hidden],.tfld-media-personal-item__form[hidden]{display:none!important;}
.tfld-media-editor [data-storage-more][hidden],.tfld-media-editor [data-tfld-media-editor-more][hidden],.tfld-media-v2-personal .tfld-btn[hidden],.tfld-media-v2-lightbox__open[hidden]{display:none!important;}
.tfld-media-editor-item [data-storage-file]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.tfld-media-editor-item label:focus-within{outline:2px solid #54e8e2;outline-offset:2px;}
.tfld-media-v2-lightbox__viewer{position:relative;}
.tfld-media-v2-lightbox__unavailable{min-height:42vh;display:grid;place-items:center;padding:24px;color:#d7e8ef;text-align:center;}
.tfld-media-v2-public .tfld-media-v2-card__meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.tfld-media-v2-card__unavailable{position:absolute;inset:0;display:grid;place-items:center;padding:12px;color:rgba(229,241,248,.66);font-size:12px;text-align:center;background:linear-gradient(145deg,rgba(17,38,52,.96),rgba(6,17,27,.98));}
.tfld-media-v2-card__unavailable[hidden]{display:none!important;}
.tfld-media-v2-personal,.tfld-media-editor{margin:22px 0;padding:clamp(14px,2.4vw,26px);border:1px solid rgba(24,199,195,.24);border-radius:14px;background:rgba(7,22,33,.94);color:#e8f4fb;}
.tfld-media-v2-personal__head,.tfld-media-editor__head,.tfld-media-editor__list-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
.tfld-media-v2-personal__head h2,.tfld-media-editor h2,.tfld-media-editor h3,.tfld-media-manage h2,.tfld-media-manage h3,.tfld-media-manage h4{margin:0;color:#f2f7fb;}
.tfld-media-v2-personal__head p,.tfld-media-editor__head p{margin:5px 0 0;color:rgba(224,239,248,.66);}
.tfld-media-v2-personal__message,.tfld-media-editor__message{min-height:1.4em;color:#65e0bf;}
.tfld-media-personal-item,.tfld-media-editor-item{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px 0;border-top:1px solid rgba(255,255,255,.1);}
.tfld-media-personal-item__summary,.tfld-media-editor-item>div:first-child{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;}
.tfld-media-personal-item__summary span,.tfld-media-editor-item span{color:rgba(224,239,248,.66);font-size:12px;}
.tfld-media-personal-item__summary a,.tfld-media-editor-item a{color:#67dce5;font-size:12px;overflow-wrap:anywhere;}
.tfld-media-personal-item__form,.tfld-media-editor__edit-form{display:grid;gap:12px;width:100%;margin-top:14px;}
.tfld-media-personal-item__form label,.tfld-media-editor label,.tfld-media-manage label{display:grid;gap:6px;color:rgba(224,239,248,.76);font-size:12px;}
.tfld-media-personal-item__form input,.tfld-media-editor input:not([type=file]):not([type=range]),.tfld-media-editor select,.tfld-media-manage input:not([type=file]):not([type=range]):not([type=checkbox]),.tfld-media-manage select{width:100%;min-height:40px;padding:8px 10px;border:1px solid rgba(160,205,226,.25);border-radius:8px;background:#091b28;color:#e8f4fb;}
.tfld-media-editor input[type=file],.tfld-media-manage input[type=file]{width:100%;color:rgba(224,239,248,.8);}
.tfld-media-editor__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.tfld-media-editor__card,.tfld-media-editor__list-card{display:grid;align-content:start;gap:12px;padding:16px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.025);}
.tfld-media-editor__list-card{margin-top:16px;}
.tfld-media-editor__edit-actions,.tfld-media-editor-item__actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.tfld-media-editor__edit-form .tfld-media-editor__edit-actions{justify-content:flex-end;}
/* Your submissions: compact rows with a thumbnail, a status badge and one Edit action. */
.tfld-media-v2-personal{max-width:860px;margin:18px auto;}
.tfld-media-v2-personal__head{margin-bottom:8px;}
.tfld-media-v2-personal__buttons{display:flex;flex-wrap:wrap;gap:8px;}
.tfld-media-v2-personal__head h2{font-size:20px;}
.tfld-media-v2-personal [data-tfld-media-personal-message]{margin:0 0 6px;}
.tfld-media-personal-item{display:block;padding:10px 0;}
.tfld-media-personal-item__summary{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:12px;}
.tfld-media-personal-item__thumb{display:grid;place-items:center;width:72px;height:48px;overflow:hidden;border-radius:8px;background:#0b2230;color:rgba(224,239,248,.5);font-size:18px;}
.tfld-media-personal-item__thumb img{display:block;width:100%;height:100%;object-fit:cover;}
.tfld-media-personal-item__text{display:grid;gap:3px;min-width:0;}
.tfld-media-personal-item__text strong{overflow:hidden;color:#f2f7fb;font-size:14px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap;}
.tfld-media-personal-item__meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;}
.tfld-media-personal-item__meta i{color:rgba(224,239,248,.62);font-size:12px;font-style:normal;}
.tfld-media-personal-item__status{padding:1px 8px;border:1px solid rgba(160,205,226,.3);border-radius:999px;color:#dcecf5;font-size:11px;font-weight:700;}
.tfld-media-personal-item__status.is-approved{border-color:rgba(101,224,191,.5);background:rgba(101,224,191,.12);color:#65e0bf;}
.tfld-media-personal-item__status.is-pending{border-color:rgba(255,196,87,.5);background:rgba(255,196,87,.12);color:#ffc457;}
.tfld-media-personal-item__status.is-rejected{border-color:rgba(255,120,120,.5);background:rgba(255,120,120,.12);color:#ff8f8f;}
.tfld-media-personal-item__text em{color:rgba(255,160,160,.9);font-size:12px;font-style:normal;}
.tfld-media-personal-item__form{padding:12px;border-radius:10px;background:rgba(255,255,255,.04);}
.tfld-media-personal-item__actions{display:flex;gap:8px;}
.tfld-media-personal-item__actions .tfld-media-personal-item__delete{margin-left:auto;border-color:rgba(255,120,120,.55);background:transparent;color:#ff8f8f;}
.tfld-media-personal-item__actions .tfld-media-personal-item__delete:hover,.tfld-media-personal-item__actions .tfld-media-personal-item__delete:focus-visible{background:rgba(255,120,120,.14);color:#ffb3b3;}
.tfld-media-personal-item__actions .tfld-media-personal-item__delete:disabled{opacity:.5;cursor:default;}
@media(max-width:760px){
  .tfld-media-personal-item__summary{grid-template-columns:56px minmax(0,1fr) auto;gap:10px;}
  .tfld-media-personal-item__thumb{width:56px;height:40px;}
  .tfld-media-editor__grid{grid-template-columns:minmax(0,1fr);}
  .tfld-media-personal-item,.tfld-media-editor-item{flex-direction:column;}
}

/* Archive image viewer: slim header, small margins, no scrolling; the footer info always fits on screen. */
[data-tfld-media-v2-lightbox]{padding:8px;}
.tfld-media-v2-lightbox{display:flex;flex-direction:column;width:min(1240px,98vw);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:hidden;border-color:rgba(50,197,211,.24);border-radius:12px;background:linear-gradient(180deg,#0a1b28,#06121d);box-shadow:0 32px 100px rgba(0,0,0,.68),0 0 0 1px rgba(255,255,255,.025);}
.tfld-media-v2-lightbox__head{flex:0 0 auto;min-height:0;gap:8px;padding:5px 8px 5px 12px;border-bottom-color:rgba(104,182,204,.16);background:linear-gradient(110deg,rgba(18,49,65,.72),rgba(8,24,36,.9));}
.tfld-media-v2-lightbox__heading{display:grid;flex:1;gap:0;min-width:0;}
.tfld-media-v2-lightbox__heading>span{display:none;}
.tfld-media-v2-lightbox__title{overflow:hidden;color:#f3f8fb;font-size:15px;line-height:1.3;font-weight:750;text-overflow:ellipsis;white-space:nowrap;}
.tfld-media-v2-lightbox__body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;max-height:none;overflow:hidden;padding:6px 8px 8px;}
.tfld-media-v2-lightbox .tfld-modal__head-actions{gap:6px;}
.tfld-media-v2-lightbox .tfld-modal__close{min-height:28px;margin:0;padding:3px 10px;border-color:rgba(117,174,195,.25);border-radius:7px;background:rgba(255,255,255,.045);color:#e4f2f7;font-size:12px;font-weight:700;}
.tfld-media-v2-lightbox .tfld-modal__close:hover{border-color:rgba(42,210,215,.55);background:rgba(24,199,195,.13);}
.tfld-media-v2-lightbox .tfld-media-v2-lightbox__count{padding:3px 8px;border:1px solid rgba(117,174,195,.2);border-radius:6px;background:rgba(4,14,22,.5);color:rgba(224,241,248,.72);font-variant-numeric:tabular-nums;}
.tfld-media-v2-lightbox__viewer{flex:0 1 auto;min-height:0;grid-template-columns:minmax(0,1fr);gap:0;}
.tfld-media-v2-lightbox__stage{grid-area:1/1;}
.tfld-media-v2-lightbox__nav{position:absolute;z-index:3;top:50%;transform:translateY(-50%);width:34px;height:44px;border-radius:50%;background:rgba(5,20,29,.82);box-shadow:0 5px 18px rgba(0,0,0,.32);}
.tfld-media-v2-lightbox__nav--prev{left:8px;}.tfld-media-v2-lightbox__nav--next{right:8px;}
.tfld-media-v2-lightbox__frame{background:radial-gradient(ellipse at 50% 45%,rgba(22,49,61,.48),rgba(1,8,13,.97) 76%);border-radius:9px;border-color:rgba(114,183,202,.18);}
.tfld-media-v2-lightbox__frame[data-kind="image"]{min-height:0;}
.tfld-media-v2-lightbox__frame img{max-height:calc(100vh - 128px);max-height:calc(100dvh - 128px);}
.tfld-media-v2-lightbox__frame iframe{height:min(calc(100vh - 128px), calc((min(1240px, 98vw) - 18px) * 9 / 16));height:min(calc(100dvh - 128px), calc((min(1240px, 98vw) - 18px) * 9 / 16));}
.tfld-media-v2-lightbox__meta{flex:0 0 auto;margin-top:6px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:6px 2px 0;border-top:1px solid rgba(114,183,202,.16);}
.tfld-media-v2-lightbox__meta .tfld-media-v2-lightbox__sub:first-child{gap:6px 8px;}
.tfld-media-v2-lightbox__meta-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border:1px solid rgba(134,185,203,.15);border-radius:6px;background:rgba(255,255,255,.035);color:rgba(223,239,246,.78);font-size:11px;}
.tfld-media-v2-lightbox__meta-chip strong{color:rgba(141,202,217,.8);font-size:9px;letter-spacing:.08em;text-transform:uppercase;}
.tfld-media-v2-lightbox__open{padding:4px 10px;border:1px solid rgba(30,203,205,.27);border-radius:6px;background:rgba(24,199,195,.08);text-decoration:none;white-space:nowrap;}
.tfld-media-v2-lightbox__open:hover{background:rgba(24,199,195,.16);}
@media(max-width:760px){
  [data-tfld-media-v2-lightbox]{padding:4px;}
  .tfld-media-v2-lightbox{width:calc(100vw - 8px);max-height:calc(100dvh - 8px);border-radius:10px;}
  .tfld-media-v2-lightbox__body{padding:4px 6px 6px;}
  .tfld-media-v2-lightbox__frame img{max-height:calc(100dvh - 150px);}
  .tfld-media-v2-lightbox__frame iframe{height:min(calc(100dvh - 150px), calc((100vw - 22px) * 9 / 16));}
  .tfld-media-v2-lightbox__nav{width:32px;height:40px;}
  .tfld-media-v2-lightbox__nav--prev{left:4px;}.tfld-media-v2-lightbox__nav--next{right:4px;}
  .tfld-media-v2-lightbox__meta{align-items:flex-start;flex-direction:column;gap:6px;}
}

/* wp-admin: Media > Image storage */
.tfld-media-storage-admin .tfld-media-editor__edit-actions{display:flex;flex-wrap:wrap;gap:8px;}
.tfld-media-storage-admin .tfld-media-editor-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #dcdcde;}
.tfld-media-storage-admin .tfld-media-editor-item strong,.tfld-media-storage-admin .tfld-media-editor-item span{display:block;}
.tfld-media-storage-admin .tfld-media-editor-item__actions{display:flex;gap:8px;flex-wrap:wrap;}
.tfld-media-storage-admin .tfld-media-v2-pill{display:inline-block;padding:3px 10px;border:1px solid #2271b1;border-radius:3px;color:#2271b1;background:#f6f7f7;cursor:pointer;font-size:13px;}
.tfld-media-storage-admin [data-storage-file]{display:none;}

/* Manage dialogs (Add media, Edit media): dark controls in every state, even-spaced fields.
   The theme paints inputs and selects white on :focus/:hover and adds bottom margins, so both are reset here. */
.tfld-manage-dialog .tfld-modal__body{display:grid;gap:16px;padding:16px 18px 20px;}
.tfld-manage-dialog .tfld-media-editor__card{gap:14px;padding:18px;margin:0;}
.tfld-manage-dialog .tfld-media-editor__card+.tfld-media-editor__card{margin-top:0;padding-top:18px;border-top:1px solid rgba(255,255,255,.1);}
.tfld-manage-dialog .tfld-media-editor__card h4{font-size:20px;line-height:1.2;margin:0 0 2px;}
.tfld-manage-dialog label{gap:6px;font-weight:600;letter-spacing:.01em;}
.tfld-manage-dialog input:not([type=file]):not([type=checkbox]),.tfld-manage-dialog select{margin:0!important;background-color:#091b28!important;color:#e8f4fb!important;box-shadow:none;font-size:14px;line-height:1.3;color-scheme:dark;}
.tfld-manage-dialog select{appearance:none;-webkit-appearance:none;padding-right:34px;background:#091b28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2395c9d8' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;}
.tfld-manage-dialog input:not([type=file]):not([type=checkbox]):hover,.tfld-manage-dialog select:hover{border-color:rgba(160,205,226,.45);}
.tfld-manage-dialog input:not([type=file]):not([type=checkbox]):focus,.tfld-manage-dialog select:focus,.tfld-manage-dialog input:not([type=file]):not([type=checkbox]):active,.tfld-manage-dialog select:active{background-color:#0b2434!important;color:#e8f4fb!important;border-color:#32c5d3;outline:2px solid rgba(50,197,211,.28);outline-offset:0;}
.tfld-manage-dialog select option,.tfld-manage-dialog select optgroup{background:#0b1c29;color:#e8f4fb;}
.tfld-manage-dialog input::placeholder{color:rgba(224,239,248,.4);}
.tfld-manage-dialog input[type=file]{padding:8px;border:1px dashed rgba(160,205,226,.35);border-radius:8px;background:rgba(255,255,255,.02);font-size:13px;}
.tfld-manage-dialog input[type=file]::file-selector-button{margin-right:12px;padding:7px 14px;border:1px solid rgba(50,197,211,.5);border-radius:6px;background:rgba(24,199,195,.12);color:#e8f4fb;font:inherit;font-weight:700;cursor:pointer;}
.tfld-manage-dialog input[type=file]::file-selector-button:hover{background:rgba(24,199,195,.24);}
.tfld-manage-dialog .tfld-btn--primary{width:100%;min-height:44px;margin:4px 0 0;border:1px solid rgba(50,197,211,.6);border-radius:8px;background:rgba(24,199,195,.18);color:#f2fbfd;font-weight:700;cursor:pointer;}
.tfld-manage-dialog .tfld-btn--primary:hover,.tfld-manage-dialog .tfld-btn--primary:focus-visible{background:rgba(24,199,195,.32);color:#fff;}
.tfld-manage-dialog .tfld-media-editor__message{margin:0;min-height:0;}
.tfld-manage-dialog .tfld-media-editor__message:empty{display:none;}
.tfld-manage-dialog .tfld-media-editor__edit-form{margin:0;gap:14px;}
.tfld-manage-dialog .tfld-media-editor__edit-actions{gap:10px;}
.tfld-manage-dialog .tfld-media-editor__edit-actions .tfld-btn--primary{width:auto;margin:0;flex:1 1 140px;}
.tfld-manage-dialog .tfld-media-editor__edit-actions .tfld-btn{min-height:44px;}
.tfld-manage-dialog:not(.tfld-manage-drawer) .tfld-modal__dialog{width:min(560px,96vw);max-height:92vh;overflow-y:auto;}
.tfld-manage-dialog [data-manage-campaign-search],.tfld-manage-dialog input[type=search]{margin:0 0 6px;}
.tfld-manage-dialog .tfld-modal__dialog{color-scheme:dark;scrollbar-color:rgba(160,205,226,.35) transparent;scrollbar-width:thin;}
