
/*
Theme Name: KMoto Service Theme v2
Theme URI: https://example.com/kmoto-service-theme-v2
Author: ChatGPT
Description: Minimal service theme with a fixed left sidebar (Service List, Calendar, Parts Catalog). No header gap. Links resolve by page slugs (no hard-coded IDs).
Version: 2.1.0
License: GPLv2 or later
Text Domain: kmoto-service
*/

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; color: #e6edf3; background: #0f172a; }

/* Layout */
#kmoto-app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
#kmoto-sidebar { background: #0b1220; border-right: 1px solid rgba(255,255,255,0.06); padding: 22px 18px; position: sticky; top: 0; height: 100vh; }
#kmoto-main { background: #0f172a; padding: 28px; }
.kmoto-logo { display:flex; align-items:center; gap:10px; margin-bottom: 20px; font-weight: 700; font-size: 20px; }
.kmoto-logo .emoji { font-size: 20px; }
.kmoto-divider { height: 1px; width: 100%; background: rgba(255,255,255,0.06); margin: 14px 0 10px; }

.kmoto-nav { list-style: none; padding: 0; margin: 16px 0 26px; display: grid; gap: 8px; }
.kmoto-nav a { display: block; text-decoration: none; color: #c8d2e0; padding: 12px 14px; border-radius: 10px; transition: transform .06s ease, background .2s ease, color .2s ease; }
.kmoto-nav a:hover { background: rgba(148,163,184,.12); transform: translateY(-1px); }
.kmoto-nav .active > a { background: #1d2a44; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.06); }

.kmoto-credit { color: #94a3b8; font-size: 12px; opacity: .85; position: absolute; bottom: 18px; left: 18px; right: 18px; }

/* Content styles */
.kmoto-card { background: #0b1220; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.kmoto-prose h1, .kmoto-prose h2, .kmoto-prose h3 { margin: 0 0 14px; }
.kmoto-prose > * + * { margin-top: 14px; }
.kmoto-prose a { color: #8ab4ff; }

/* Remove default WP theme gaps / titles in this layout */
.entry-title, .page-title, h1.entry-title { display:none !important; }
#wpadminbar { position: fixed; } /* keep admin bar fixed without shifting layout */
body.admin-bar #kmoto-main { padding-top: 46px; } /* small breathing room when logged-in */

/* Make images/media responsive */
.kmoto-prose img, .kmoto-prose video, .kmoto-prose iframe { max-width: 100%; height: auto; border-radius: 10px; }


/* KMOTO mobile usability upgrade v2.1.0 */
:root{--kmoto-mobile-bar:62px;}
.kmoto-mobile-toggle{display:none;}
.kmoto-sidebar-backdrop{display:none;}
.kmoto-logo img{width:34px;height:34px;object-fit:contain;border-radius:8px;}
#kmoto-main{min-width:0;}
.kmoto-prose,.kmoto-card{max-width:100%;}
button,a,input,select,textarea{touch-action:manipulation;}
@media (max-width: 900px){
  html,body{min-height:100%;overflow-x:hidden;}
  body{font-size:16px;}
  #kmoto-app{display:block;min-height:100vh;}
  #kmoto-main{padding:calc(var(--kmoto-mobile-bar) + 14px) 12px 24px;}
  body.admin-bar #kmoto-main{padding-top:calc(var(--kmoto-mobile-bar) + 58px);}
  .kmoto-mobile-toggle{display:inline-flex;position:fixed;left:12px;top:12px;z-index:100002;align-items:center;gap:9px;min-height:46px;padding:0 14px;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:#111b2d;color:#eef4ff;font-weight:900;box-shadow:0 14px 32px rgba(0,0,0,.38);cursor:pointer;}
  body.admin-bar .kmoto-mobile-toggle{top:58px;}
  .kmoto-mobile-toggle .bars{width:18px;height:14px;display:inline-grid;gap:4px;}
  .kmoto-mobile-toggle .bars span{display:block;height:2px;border-radius:999px;background:currentColor;}
  #kmoto-sidebar{position:fixed;z-index:100001;top:0;bottom:0;left:0;width:min(86vw,320px);height:auto;overflow:auto;padding:76px 18px 18px;transform:translateX(-104%);transition:transform .2s ease;box-shadow:18px 0 48px rgba(0,0,0,.5);}
  body.admin-bar #kmoto-sidebar{padding-top:116px;}
  body.kmoto-sidebar-open #kmoto-sidebar{transform:translateX(0);}
  .kmoto-sidebar-backdrop{display:block;position:fixed;z-index:100000;inset:0;background:rgba(2,6,23,.62);opacity:0;pointer-events:none;transition:opacity .2s ease;}
  body.kmoto-sidebar-open .kmoto-sidebar-backdrop{opacity:1;pointer-events:auto;}
  body.kmoto-sidebar-open{overflow:hidden;}
  .kmoto-logo{font-size:18px;margin-bottom:16px;}
  .kmoto-nav{gap:10px;}
  .kmoto-nav a{min-height:48px;display:flex;align-items:center;font-size:16px;padding:14px 15px;}
  .kmoto-credit{position:static;margin-top:24px;}
  .kmoto-card{border-radius:14px;padding:14px;}
}
@media (max-width: 480px){
  #kmoto-main{padding-left:10px;padding-right:10px;}
  .kmoto-mobile-toggle{left:10px;top:10px;}
  body.admin-bar .kmoto-mobile-toggle{top:56px;}
}
