/* ==========================================================================
   library.css — shared chrome for the making-side "library" pages
   (Templates, Uploads, Icons, Fonts, Brand & styles, My Bathymetry).
   Pairs with css/dashboard.css (the #app.dash sidebar shell) + tokens.css.
   ========================================================================== */

.lib-main { flex: 1; overflow-y: auto; min-width: 0; }
.lib-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 40px 56px; box-sizing: border-box; }

.lib-head { display: flex; align-items: center; gap: 16px; padding-bottom: 8px; flex-wrap: wrap; }
.lib-head h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 600; margin: 0; flex: 1; }
.lib-desc { font-size: 13px; color: var(--mx-text-muted, #68736d); padding-bottom: 20px; }

.lib-search { display: flex; align-items: center; gap: 8px; height: 40px; background: #fff;
  border: 1px solid var(--mx-border, #e6e9e7); border-radius: 8px; padding: 0 12px; box-sizing: border-box; }
.lib-search:focus-within { border-color: #5f8d74; }
.lib-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 12.5px; color: var(--mx-text, #212b26); }
.lib-search input::placeholder { color: #9aa49e; }

/* action buttons in the header */
.lib-btn { text-decoration: none; height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; box-sizing: border-box; }
.lib-btn.ghost { border: 1px solid var(--mx-border, #e6e9e7); background: #fff; color: var(--mx-text, #212b26); }
.lib-btn.ghost:hover { background: #f2f4f2; }
.lib-btn.solid { background: #5f8d74; color: #fff; border: 1px solid transparent; }
.lib-btn.solid:hover { background: #0c6457; }

/* filter / category chips */
.lib-chips { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 22px; }
.lib-chip { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; background: #fff; color: var(--mx-text, #212b26);
  border: 1px solid var(--mx-border, #e6e9e7); }
.lib-chip:hover { border-color: #5f8d74; }
.lib-chip.on { background: #0c6457; color: #fff; border-color: #0c6457; }
.lib-chip .ct { opacity: .65; font-weight: 500; }

/* section header */
.lib-sec { font-size: 15px; font-weight: 600; padding-bottom: 14px; }
.lib-sec.row { display: flex; align-items: baseline; gap: 12px; }
.lib-sec.row .flex { flex: 1; }
.lib-sec .link { font-size: 12.5px; font-weight: 600; color: #0c6457; cursor: pointer; text-decoration: none; }

/* generic library card grid */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.lib-card { background: #fff; border: 1px solid var(--mx-border, #e6e9e7); border-radius: 12px; overflow: hidden;
  box-shadow: var(--mx-shadow-1); transition: box-shadow .14s; }
.lib-card:hover { box-shadow: var(--mx-shadow-2); }
.lib-thumb { display: block; position: relative; height: 150px; background: repeating-linear-gradient(45deg, #eef4f1 0 10px, #f6faf8 10px 20px); text-decoration: none; }
.lib-cardbody { padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.lib-cardbody .g { flex: 1; min-width: 0; }
.lib-cardbody .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-cardbody .m { font-size: 11.5px; color: var(--mx-text-muted, #68736d); margin-top: 2px; }
.lib-use { text-decoration: none; font-size: 12px; font-weight: 600; color: #0c6457; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--mx-border, #e6e9e7); flex: 0 0 auto; }
.lib-use:hover { background: #e3f1ee; border-color: #e3f1ee; }
.lib-chip-type { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 600; color: #0c6457; background: #e3f1ee; border-radius: 999px; padding: 2px 9px; }

@media (max-width: 720px) { .lib-wrap { padding: 24px 16px 48px; } }
