/* integrations/module.css: the app store, which is Settings > Integrations.
   A category rail beside a grid of cards; logos sit on a white tile in
   every theme, because brand marks are drawn for a light ground. */
.app-store{padding:18px;}
.as-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;}
.as-head .sub-text{margin:2px 0 0;}
.as-search{position:relative;margin:14px 0 16px;}
.as-search .ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted, #8A8F86);pointer-events:none;}
.as-search input{width:100%;height:42px;padding:8px 10px 8px 36px;font-family:var(--font-ui);font-size:15px;box-sizing:border-box;
  border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--paper-raised);color:var(--ink);}
.as-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:20px;align-items:start;}

.as-rail{display:flex;flex-direction:column;gap:1px;position:sticky;top:12px;}
.as-cat{display:flex;align-items:center;gap:9px;width:100%;padding:7px 10px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;font-size:13.5px;text-align:left;cursor:pointer;opacity:.82;}
.as-cat:hover{background:var(--subtle-bg, rgba(0,0,0,.04));opacity:1;}
.as-cat.active{background:var(--subtle-bg, rgba(0,0,0,.06));font-weight:600;opacity:1;}
.as-cat .ic{width:16px;height:16px;flex:0 0 auto;}
.as-cat span:nth-child(2){flex:1 1 auto;min-width:0;}
.as-n{font-size:12px;color:var(--ink-soft);font-variant-numeric:tabular-nums;}

.as-section-title{font-family:var(--font-display);font-size:15px;font-weight:600;margin:0 0 10px;}
.as-featured{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-bottom:22px;}
.as-feature{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-raised);color:inherit;font:inherit;text-align:left;cursor:pointer;}
.as-feature .sub-text{line-height:1.45;flex:1 1 auto;}
.as-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;}
.as-card{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-raised);color:inherit;font:inherit;text-align:left;cursor:pointer;min-width:0;}
.as-card:hover,.as-feature:hover{border-color:var(--sage);}
.as-card:focus-visible,.as-feature:focus-visible,.as-cat:focus-visible{outline:2px solid var(--sage);outline-offset:2px;}
.as-card.connected,.as-feature.connected{border-color:var(--sage);box-shadow:inset 0 0 0 1px var(--sage);}
.as-card{cursor:default;}
.as-card-head{display:flex;align-items:center;gap:10px;min-width:0;width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:8px;}
.as-card-head:focus-visible{outline:2px solid var(--sage);outline-offset:2px;}
.as-card-foot .btn{margin-left:auto;}
.as-want{border-style:dashed;}
.as-wanted{background:var(--mustard-soft);color:var(--mustard-ink);border-color:transparent;}
.as-shelf{margin-bottom:22px;}
.as-shelf-note{margin:-4px 0 12px;line-height:1.45;max-width:720px;}
.as-card-name{display:flex;flex-direction:column;min-width:0;}
.as-card-name .primary-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.as-card-desc{flex:1 1 auto;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.as-card-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:22px;}
.as-connect{font-size:13px;font-weight:600;}
.as-soon{font-size:12px;padding:2px 9px;border-radius:99px;background:var(--subtle-bg, rgba(0,0,0,.06));opacity:.85;}

.as-logo{flex:0 0 auto;width:40px;height:40px;border-radius:10px;background:#fff;border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center;overflow:hidden;color:#1F2E27;}
.as-logo img{width:24px;height:24px;object-fit:contain;}
.as-logo .ic{width:22px;height:22px;}
.as-logo.mono{font-family:var(--font-display);font-weight:600;font-size:14px;}
.as-logo.big{width:56px;height:56px;border-radius:14px;}
.as-logo.big img{width:34px;height:34px;}
.as-logo.big .ic{width:30px;height:30px;}

.as-detail-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.as-detail-title{flex:1 1 auto;min-width:0;}
.as-detail-name{font-family:var(--font-display);font-size:20px;font-weight:600;line-height:1.2;}
.as-detail-desc{margin:14px 0 16px;line-height:1.55;max-width:640px;}
.as-uses{font-size:13px;line-height:1.45;border-radius:var(--radius);padding:9px 12px;margin-bottom:12px;max-width:640px;}
.as-uses.used{background:var(--sage-soft);color:var(--sage-ink);}
.as-uses.idle{background:var(--mustard-soft);color:var(--mustard-ink);}
.as-card-foot .micro-text{margin-left:8px;}
.as-box{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-raised);padding:14px 16px;margin-bottom:12px;max-width:640px;}
.as-box .sub-text{margin:4px 0 10px;line-height:1.5;}
.as-box .field{margin-bottom:10px;}
.as-connect-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
/* A module's own panel shown as an app's page: the page already names it. */
.app-detail-panel > .primary-text:first-child,
.app-detail-panel > :first-child > .primary-text:first-child{display:none !important;}

@media (max-width:760px){
  .app-store{padding:14px;}
  .as-layout{grid-template-columns:1fr;gap:12px;}
  /* The rail becomes one row of chips that scrolls sideways. */
  .as-rail{position:static;flex-direction:row;overflow-x:auto;gap:6px;padding-bottom:4px;scrollbar-width:none;}
  .as-cat{width:auto;flex:0 0 auto;border:1px solid var(--line);border-radius:99px;padding:6px 12px;}
  .as-cat .ic{display:none;}
  .as-grid{grid-template-columns:1fr;}
  /* The front shelf scrolls sideways rather than stacking three tall cards. */
  .as-featured{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:82%;overflow-x:auto;scrollbar-width:none;}
}
