/* Veftr marketplace UI v1. Uses theme variables; no changes to package trust. */
body.tmux-store-active #native-store-view{padding:0!important;min-width:0;overflow-y:auto;background:var(--main-bg,var(--surface-0,transparent));}
body.tmux-store-active #native-store-view>div:first-child:not(#native-store-grid){display:none!important;}
#native-store-grid.tmux-marketplace{display:block!important;padding:clamp(16px,2.5vw,32px);max-width:1600px;width:100%;margin:0 auto;box-sizing:border-box;color:var(--text-1,var(--text-main,#e8faf7));font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.tmux-marketplace *{box-sizing:border-box;}
.tmux-marketplace h1,.tmux-marketplace h2,.tmux-marketplace h3,.tmux-marketplace p{margin:0;}
.tmux-marketplace h1{font-size:clamp(25px,2.5vw,34px);letter-spacing:-.04em;line-height:1.2;}
.tmux-marketplace h2{font-size:clamp(19px,2vw,23px);letter-spacing:-.025em;line-height:1.25;}
.tmux-marketplace h3{font-size:16px;margin-top:18px;margin-bottom:10px;}
.tmux-main-head,.tmux-heading,.tmux-cardhead,.tmux-foot,.tmux-controls,.tmux-detail-head,.tmux-bulk{display:flex;align-items:center;gap:12px;}
.tmux-main-head{justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;}
.tmux-main-head p{font-size:13px;color:var(--grey,#8ba3a0);margin-top:5px;}
.tmux-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 20px;border-bottom:1px solid var(--border-1,#21403c);padding-bottom:12px;}
.tmux-marketplace .tmux-tab,.tmux-marketplace .tmux-btn,.tmux-link-button{font-family:inherit;cursor:pointer;appearance:none;border:1px solid transparent;}
.tmux-marketplace .tmux-tab{border-radius:999px;background:var(--surface-2,#152b2b);color:var(--text-1,#e3f6f3);padding:9px 15px;font-size:13px;font-weight:650;transition:background .15s,border-color .15s;}
.tmux-marketplace .tmux-tab.active,.tmux-marketplace .tmux-tab:hover{background:color-mix(in srgb,var(--accent,#43d8c2) 18%,transparent);border-color:var(--accent,#43d8c2);color:var(--text-1,#e3f6f3);}
.tmux-marketplace .tmux-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:35px;border-radius:10px;padding:8px 13px;line-height:1.15;font-size:12px;font-weight:650;white-space:normal;text-align:center;}
.tmux-marketplace .tmux-btn.primary,.tmux-dialog .tmux-btn.primary{background:var(--green,#8aefc2);color:#061912;border:1px solid transparent;}
.tmux-marketplace .tmux-btn.muted,.tmux-dialog .tmux-btn.muted{background:var(--surface-3,#183634);color:var(--text-1,#efffff);border:1px solid var(--border-1,#34504d);}
.tmux-marketplace .tmux-btn:disabled,.tmux-dialog .tmux-btn:disabled{opacity:.55;cursor:not-allowed;}
.tmux-marketplace button:focus-visible,.tmux-dialog button:focus-visible,.tmux-marketplace input:focus-visible,.tmux-marketplace select:focus-visible{outline:2px solid var(--accent,#42d9c2);outline-offset:3px;}
.tmux-hero{position:relative;overflow:hidden;padding:clamp(20px,3vw,34px);margin-bottom:24px;border-radius:18px;background:linear-gradient(110deg,color-mix(in srgb,var(--accent,#42d9c2) 18%,var(--sidebar-bg,#092421)),var(--surface-1,#091a1b));border:1px solid var(--border-1,#1e4642);}
.tmux-hero::after{content:"";position:absolute;width:320px;height:320px;border:1px solid color-mix(in srgb,var(--accent,#42d9c2) 20%,transparent);border-radius:50%;right:-90px;top:-160px;pointer-events:none;}
.tmux-eyebrow{font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--accent,#42d9c2);}
.tmux-hero h2{font-size:clamp(22px,3vw,31px);margin-top:10px;margin-bottom:10px;}
.tmux-hero>p{max-width:590px;font-size:14px;line-height:1.55;color:var(--text-2,var(--grey,#b2ccc6));margin-bottom:16px;}
.tmux-tags{display:flex;align-items:center;flex-wrap:wrap;gap:6px;}
.tmux-badge{display:inline-flex;align-items:center;max-width:100%;border-radius:999px;padding:5px 9px;background:var(--surface-3,#173432);border:1px solid var(--border-1,#24504b);font-size:10px;line-height:1.25;font-weight:650;color:var(--text-2,var(--text-main,#def6f1));}
.tmux-badge.good{background:color-mix(in srgb,var(--green,#8aefc2) 16%,transparent);color:var(--green,#8aefc2);border-color:color-mix(in srgb,var(--green,#8aefc2) 25%,transparent);}
.tmux-badge.warn{color:var(--yellow,#ffd076);}
.tmux-badge.bad{color:var(--red,#ff7979);}
.tmux-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:22px;}
.tmux-marketplace .tmux-search,.tmux-marketplace .tmux-select{min-height:42px;border-radius:11px;border:1px solid var(--border-1,#2b4e47);background:var(--surface-1,#0a2423);color:var(--text-1,#ecfffa);padding:10px 13px;font-family:inherit;font-size:13px;}
.tmux-marketplace .tmux-search{flex:1 1 280px;min-width:180px;}
.tmux-marketplace .tmux-select{flex:0 1 auto;max-width:180px;min-width:120px;}
.tmux-heading{justify-content:space-between;flex-wrap:wrap;align-items:baseline;margin:0 0 13px;}
.tmux-heading small,.tmux-muted{font-size:12px;color:var(--grey,#93aba7);line-height:1.55;overflow-wrap:anywhere;}
.tmux-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,255px),1fr));gap:14px;align-items:stretch;}
.tmux-card,.tmux-installed,.tmux-repo{background:var(--sidebar-bg,var(--surface-1,#081c1b));border:1px solid var(--border-1,#28423e);border-radius:15px;padding:17px;min-width:0;display:flex;flex-direction:column;gap:12px;transition:border-color .15s,transform .15s;}
.tmux-card:hover,.tmux-installed:hover{border-color:color-mix(in srgb,var(--accent,#42d9c2) 50%,var(--border-1,#28423e));}
.tmux-cardhead{align-items:flex-start;min-width:0;}
.tmux-icon{width:54px;height:54px;min-width:54px;display:grid;place-items:center;border-radius:14px;border:1px solid var(--border-1,#345450);background:var(--surface-1,#071e1d);font-size:25px;font-weight:750;color:var(--accent,#42d9c2);overflow:hidden;}
.tmux-icon img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border:0!important;border-radius:12px!important;margin:0!important;}
.tmux-name{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px;}
.tmux-link-button{padding:0;text-align:left;background:transparent!important;border:0!important;color:var(--text-1,#fff);font-size:17px;line-height:1.25;font-weight:750;overflow-wrap:anywhere;}
.tmux-link-button:hover{text-decoration:underline;color:var(--accent,#42d9c2);}
.tmux-name small{font-size:11px;color:var(--grey,#91ada7);overflow-wrap:anywhere;}
.tmux-summary{font-size:13px;line-height:1.6;min-height:62px;max-height:105px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow-wrap:anywhere;flex:1;}
.tmux-trust{font-size:11px;line-height:1.4;margin-top:auto;}
.tmux-trust.good{color:var(--green,#8aefc2);}
.tmux-trust.warn{color:var(--yellow,#ffd076);}
.tmux-trust.bad{color:var(--red,#ff7979);}
.tmux-foot{justify-content:space-between;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--border-1,#25443f);}
.tmux-foot>small{font-size:11px;color:var(--grey,#91ada7);}
.tmux-controls{justify-content:flex-end;flex-wrap:wrap;gap:7px;}
.tmux-installed .tmux-controls{margin-top:auto;justify-content:flex-start;}
.tmux-empty{padding:26px;border:1px dashed var(--border-2,#395d57);border-radius:14px;background:var(--surface-1,#102824);font-size:13px;color:var(--grey,#a8c0ba);}
.tmux-bulk{justify-content:space-between;flex-wrap:wrap;background:var(--surface-2,#17322e);border:1px solid var(--border-1,#34514c);border-radius:12px;padding:12px;margin-bottom:16px;font-size:12px;}
.tmux-repos{display:grid;gap:12px;margin-top:18px;}
.tmux-repo{max-width:900px;gap:6px;}
.tmux-repo small{font-size:11px;color:var(--grey,#91aaa5);overflow-wrap:anywhere;}
.tmux-repo .tmux-badge{align-self:flex-start;}
.tmux-detail-head{align-items:center;flex-wrap:wrap;padding:23px;margin:18px 0 24px;border:1px solid var(--border-1,#284740);background:var(--sidebar-bg,#0a2423);border-radius:16px;}
.tmux-detail-head>.tmux-icon{height:80px;width:80px;min-width:80px;font-size:36px;}
.tmux-detail-title{flex:1 1 230px;min-width:0;}
.tmux-detail-title h1{overflow-wrap:anywhere;}
.tmux-detail-title>p{font-size:12px;color:var(--grey,#91aca5);margin:6px 0 10px;}
.tmux-detail-body{max-width:960px;border:1px solid var(--border-1,#284740);border-radius:15px;padding:clamp(16px,3vw,28px);background:var(--sidebar-bg,#0a2221);line-height:1.65;font-size:14px;overflow-wrap:anywhere;}
.tmux-detail-body>p{margin:10px 0;}
.tmux-detail-body h2{margin-bottom:15px;}
.tmux-detail-row{display:grid;grid-template-columns:minmax(120px,35%) minmax(0,1fr);gap:12px;padding:11px 0;border-bottom:1px solid var(--border-1,#34534b);font-size:12px;overflow-wrap:anywhere;}
.tmux-detail-row>span:first-child{color:var(--grey,#95aaa6);}
.tmux-permission{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--border-1,#34534b);}
.tmux-permission code{font:11px ui-monospace,monospace;color:var(--grey,#95aaa6);overflow-wrap:anywhere;}
.tmux-doclink{color:var(--accent,#42d9c2);font-weight:700;display:inline-block;margin:12px 0;}
.tmux-warn{color:var(--yellow,#ffd076);}
.tmux-install-summary{border:1px solid var(--border-1,#35514d);border-radius:10px;padding:12px;background:var(--surface-1,#132c29);margin:10px 0 14px;font:12px/1.6 system-ui,sans-serif;max-height:40vh;overflow-y:auto;}
.tmux-install-summary p{margin:8px 0;}
.tmux-overlay{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.7);}
.tmux-dialog{color:var(--text-1,#eafff9);background:var(--sidebar-bg,#0d2422);border:1px solid var(--border-2,#45605a);border-radius:18px;padding:24px;max-width:540px;width:100%;max-height:90vh;overflow:auto;box-shadow:0 24px 80px rgba(0,0,0,.55);font:13px/1.6 system-ui,sans-serif;}
.tmux-dialog h2{font-size:22px;margin:0 0 10px;}.tmux-dialog>.tmux-muted{font-size:13px;}
.tmux-dialog .tmux-controls{display:flex;justify-content:flex-end;gap:8px;}
.tmux-dialog .tmux-btn{padding:10px 14px;border-radius:10px;cursor:pointer;border:1px solid transparent;}
.tmux-dialog .tmux-btn.muted{border-color:var(--border-1,#34504d);}
@media (max-width:780px){#native-store-grid.tmux-marketplace{padding:14px;} .tmux-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,225px),1fr));}.tmux-marketplace .tmux-select{flex:1 1 130px;max-width:none;}}
@media (max-width:500px){.tmux-grid{grid-template-columns:1fr;}.tmux-detail-head{padding:16px;}.tmux-marketplace .tmux-btn{min-height:40px;}.tmux-foot{align-items:stretch;}.tmux-foot .tmux-controls{flex:1;}.tmux-main-head{align-items:flex-start;}}
@media (prefers-reduced-motion:reduce){.tmux-card,.tmux-installed,.tmux-tab{transition:none!important;}}
body.tmux-store-active #detail-action-grid{display:grid!important;grid-template-columns:1fr;gap:7px;padding:12px;align-content:start;}
body.tmux-store-active .tmux-sidebar-caption{font:700 10px system-ui,sans-serif;letter-spacing:.11em;color:var(--grey,#91aaa5);padding:6px 7px;}
body.tmux-store-active .tmux-sidebar-category{cursor:pointer;text-align:left;display:block;padding:11px 12px;width:100%;border-radius:10px;border:1px solid var(--border-1,#34524c);background:var(--surface-1,#102622);color:var(--text-1,#e4f9f5);font:600 12px system-ui,sans-serif;}
body.tmux-store-active .tmux-sidebar-category:hover,body.tmux-store-active .tmux-sidebar-category.selected{border-color:var(--accent,#44d5bb);background:color-mix(in srgb,var(--accent,#44d5bb) 14%,var(--surface-1,#102622));}
body.tmux-store-active #detail-section-label,body.tmux-store-active #detail-container{display:none!important;}

/* Store footer anchor: the former flex spacer (#detail-container) is hidden.
   Let the category grid occupy available sidebar height and scroll on short screens. */
body.tmux-store-active #detail-sidebar #detail-action-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
body.tmux-store-active #detail-sidebar .user-footer {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
}
/* Phone sidebar starts below the 64px mobile toolbar: fit its full visible height. */
@media (max-width: 640px) {
  body.tmux-store-active #detail-sidebar {
    height: calc(100dvh - var(--mobile-topbar-height, 64px)) !important;
    max-height: calc(100dvh - var(--mobile-topbar-height, 64px)) !important;
  }
}
