/* Adminlane: the post lists (Posts, Pages …) on top of admin.css. Looks only. Colours: tokens.css */

/* WordPress' own heading and "Add Post" move into the overview */
body.adl-list.adl-has-hero .wrap > h1.wp-heading-inline,
body.adl-list.adl-has-hero .wrap > .page-title-action { display: none; }
body.adl-list .wrap > .subtitle {
  display: inline-flex; align-items: center; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--adl-blue-soft); color: var(--adl-blue); font-size: 12.5px; font-weight: 500;
}
body.adl-list .wrap > .wp-header-end { margin: 0; }
/* The overview is printed just above the page's own content and stays there (nothing moves after load). */
body.adl-list.adl-has-hero .wrap { margin-top: 0; }
body.adl-list .notice, body.adl-list div.updated, body.adl-list div.error { margin: 0 0 14px; }

/* ---------------------------------------------------------------------
   Overview
--------------------------------------------------------------------- */
.adl-hero {
  margin: 16px 20px 18px 2px; padding: 22px 24px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #1e2535, #2a3550); box-shadow: 0 10px 30px -14px rgba(15, 23, 42, .55); font-family: var(--adl-font);
}
body.adl-page .adl-hero { border: 1px solid light-dark(transparent, #2b3650); }
.adl-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adl-hero-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adl-hero-icon {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; color: #c7d4f0;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12);
}
body.adl-page #wpbody-content .adl-hero .adl-hero-h { margin: 0 0 3px; padding: 0; color: #fff; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
body.adl-page #wpbody-content .adl-hero p { margin: 0; color: #aab4c8; font-size: 13px; }
body.adl-page #wpbody-content .adl-hero p a { color: #dbe4f5; text-decoration: underline; text-underline-offset: 2px; }
body.adl-page #wpbody-content .adl-hero p a:hover { color: #fff; }
.adl-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adl-hero-add {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; text-decoration: none;
  background: var(--adl-blue); color: #fff !important; font-size: 13.5px; font-weight: 600; box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--adl-blue) 80%, transparent);
  transition: background .15s;
}
.adl-hero-add:hover { background: var(--adl-blue-h); color: #fff !important; }
.adl-hero-add:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--adl-accent-tint) 55%, transparent); }

.adl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.adl-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 15px; border-radius: 12px; text-decoration: none; color: #fff !important;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .11); transition: background .15s, border-color .15s;
}
.adl-tile:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.adl-tile:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--adl-accent-tint) 45%, transparent); }
.adl-tile.is-on { background: color-mix(in srgb, var(--adl-blue) 28%, transparent); border-color: color-mix(in srgb, var(--adl-accent-tint) 55%, transparent); }
.adl-tile-label { order: -1; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #9aa6bd; }
.adl-tile.is-on .adl-tile-label { color: #c7d4f0; }
.adl-tile-n { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.adl-tile.is-warn .adl-tile-n { color: #fbbf24; }

/* ---------------------------------------------------------------------
   The table (on top of the shared list style in admin.css)
--------------------------------------------------------------------- */
body.adl-list .tablenav.bottom .actions { display: none; }

/* Thumbnail */
body.adl-list .wp-list-table .column-adminlane_thumb { width: 56px; padding-left: 4px; padding-right: 0; }
body.adl-list .adl-thumb { display: block; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--adl-surface-2); }
body.adl-list .adl-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.adl-list .adl-thumb-none {
  display: grid; place-items: center; width: 100%; height: 100%; font-size: 18px; font-weight: 700; color: var(--adl-muted);
  background: repeating-linear-gradient(-45deg, var(--adl-surface-2) 0 6px, var(--adl-bg) 6px 12px); border: 1px dashed var(--adl-border-strong); border-radius: 10px; box-sizing: border-box;
}
body.adl-list .wp-list-table tbody .check-column { padding: 0 0 0 4px; vertical-align: middle; }
body.adl-list .wp-list-table td, body.adl-list .wp-list-table tbody th { vertical-align: middle; }

/* Title */
body.adl-list .wp-list-table .column-title, body.adl-list .wp-list-table .column-primary { position: relative; }
body.adl-list .wp-list-table .column-primary > strong { display: block; margin: 0; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--adl-text); }
body.adl-list .post-state {
  display: inline-flex; align-items: center; vertical-align: 1px; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.6; letter-spacing: .01em; background: var(--adl-surface-2); color: var(--adl-muted); border: 1px solid var(--adl-border);
}
body.adl-list .post-state.is-draft { background: var(--adl-warn-soft); color: var(--adl-warn); border-color: rgba(245, 158, 11, .3); }
body.adl-list .post-state.is-future { background: var(--adl-blue-soft); color: var(--adl-link); border-color: color-mix(in srgb, var(--adl-blue) 25%, transparent); }
body.adl-list .post-state.is-pending { background: var(--adl-purple-soft); color: var(--adl-purple); border-color: rgba(124, 58, 237, .25); }
body.adl-list .post-state.is-private { background: rgba(100, 116, 139, .12); color: var(--adl-text-2); }

/* Status line, swapped for the row's actions on hover */
/* Parts are separated by a dot drawn in the gap before each part. A part that starts a new
   line has its dot outside the box's left edge, where it is clipped, so no line starts or ends with a dot. */
body.adl-list .adl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 13px; margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: var(--adl-muted); overflow-x: clip; }
body.adl-list .adl-mp { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; min-width: 0; }
body.adl-list .adl-mp + .adl-mp::before { content: "·"; content: "·" / ""; position: absolute; left: -9px; opacity: .6; }
body.adl-list .adl-chip { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--adl-blue-soft); color: var(--adl-link); font-size: 11.5px; font-weight: 500; line-height: 1.7; }
body.adl-list .adl-chip--more { background: var(--adl-surface-2); color: var(--adl-muted); }

@media screen and (min-width: 783px) {
  body.adl-list tr.adl-has-meta .row-actions {
    position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 0; line-height: 1.6;
    visibility: hidden; opacity: 0; transition: opacity .12s;
  }
  body.adl-list tr.adl-has-meta:hover .row-actions, body.adl-list tr.adl-has-meta:focus-within .row-actions,
  body.adl-list tr.adl-has-meta .row-actions.visible { visibility: visible; opacity: 1; position: absolute; left: 12px; }
  body.adl-list tr.adl-has-meta:hover .adl-meta, body.adl-list tr.adl-has-meta:focus-within .adl-meta { visibility: hidden; }
}

/* Number columns (views, clicks …) */
body.adl-list .wp-list-table th.adl-num, body.adl-list .wp-list-table td.adl-num { text-align: right; width: 9em; }
body.adl-list .wp-list-table td.adl-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--adl-text); white-space: nowrap; }
body.adl-list .wp-list-table td.adl-num a { color: var(--adl-text) !important; text-decoration: none; }
body.adl-list .adl-bar { display: inline-block; vertical-align: middle; width: 52px; height: 6px; margin-right: 10px; border-radius: 999px; background: var(--adl-surface-2); overflow: hidden; }
body.adl-list .adl-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, var(--adl-blue)); }

/* ---------------------------------------------------------------------
   Smaller screens
--------------------------------------------------------------------- */
@media (max-width: 1100px) { .adl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 782px) {
  /* Below Screen Options / Help (which float at the top), title over the button, full width */
  .adl-hero { clear: both; margin: 12px 10px 16px 0; padding: 18px; border-radius: 14px; }
  .adl-hero-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .adl-hero-title { width: 100%; }
  .adl-hero-title > div { min-width: 0; flex: 1; }
  .adl-hero-icon { width: 42px; height: 42px; border-radius: 12px; }
  .adl-hero-actions { width: 100%; }
  .adl-hero-add { flex: 1; justify-content: center; white-space: nowrap; height: 42px; }
  .adl-tiles { gap: 8px; margin-top: 16px; }
  .adl-tile { padding: 10px 12px; }
  .adl-tile-n { font-size: 22px; }
  body.adl-list .wp-list-table .column-adminlane_thumb { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { body.adl-list tr.adl-has-meta .row-actions { transition: none; } }
