/* Shared by every partsonline.au page (added by the page build - pages\_parts\styles.html).
   The footer (pages\_parts\footer.html) and keeping it at the bottom of the window on short pages.
   The site menu's own styles are in site-menu.css. */

/* The page is a column: menu, the page's content, footer. A short page still has its footer at the bottom. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > #sm, body > .site-foot { flex-shrink: 0; }
.site-foot { margin-top: auto; }

/* Footer: dark band */
.site-foot { background: #1b2a4a; color: rgba(255,255,255,.75); font-size: 14px; }
.site-foot-inner { max-width: 1400px; margin: 0 auto; padding: 22px 16px 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.site-foot-copy { color: rgba(255,255,255,.6); font-size: 13px; }

/* Footer link columns (the same links as partsonline.com.au) - 4 across, 2 on tablets, 1 on phones */
.site-foot-cols { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 8px 0 6px; text-align: left; }
.site-foot-title { margin: 0 0 10px; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.site-foot-col ul { list-style: none; margin: 0; padding: 0; }
.site-foot-col li { margin: 0 0 7px; }
.site-foot a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot-states { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.site-foot-states a { display: inline-block; padding: 3px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; font-size: 13px; }
.site-foot-states a:hover { border-color: #fff; text-decoration: none; }
@media (max-width: 800px) { .site-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .site-foot-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* Loading placeholders ("skeletons"): grey blocks with a light band sweeping across, shown until the real content is
   drawn (it replaces them). Size each block with a class or style="width:..;height:..". Stops for "reduce motion". */
.skel { position: relative; display: block; overflow: hidden; background: #e6e9ee; border-radius: 4px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.65) 50%, rgba(255,255,255,0) 100%); animation: skel-shimmer 1.4s ease-in-out infinite; }
@keyframes skel-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel-row { display: flex; align-items: center; gap: 12px; }
.skel-col { display: flex; flex-direction: column; gap: 10px; }

/* The menu while /site-menu.js loads (pages\_parts\menu.html): same height and edges as the real menu */
.sm-skel { max-width: 1400px; height: 72px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.sm-skel-logo { width: 190px; height: 36px; }
.sm-skel-search { width: 240px; height: 40px; border-radius: 6px; }
.sm-skel-end { margin-left: auto; display: flex; gap: 8px; }
.sm-skel-btn { width: 96px; height: 40px; border-radius: 5px; }
@media (max-width: 900px) { .sm-skel-logo { width: 32px; } }
@media (max-width: 640px) { .sm-skel-search { display: none; } .sm-skel-btn { width: 40px; } }

/* A page's content while its script loads (home page, login page): a white card with grey lines */
.page-skel { width: 100%; max-width: 1400px; margin: 16px auto; padding: 0 16px; }
.page-skel-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: #fff; border: 1px solid #e5e3e8; border-radius: 6px; }
.page-skel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .page-skel-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .page-skel { padding: 0 2px; } .page-skel-card { padding: 16px 12px; } }
.page-skel.narrow { max-width: 520px; margin-top: 48px; }

/* Inside partswanted.html's request layer (the home page with ?embed=1): no menu, no footer */
html.embed #sm, html.embed .site-foot, html.embed .page-skel { display: none; }

/* Shown above the grey placeholders if a page still hasn't loaded after 15 seconds (pages\_parts\footer.html) */
.skel-stuck { width: 100%; max-width: 1400px; margin: 16px auto 0; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff4cc; border: 1px solid #f0d58a; border-radius: 6px; color: #5a4a12; font-size: 15px; box-sizing: border-box; }
.skel-stuck button { height: 36px; padding: 0 16px; border: 0; border-radius: 5px; background: #28a745; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.skel-stuck button:hover { background: #218838; }
