/* SolarFlow AI POC — homeowner experience: phone bezel on desktop, full-bleed on phones.
   (body keeps class "driver" so it never collides with the .phone bezel element class.) */

body.driver {
  min-height: 100vh; margin: 0;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(245,166,35,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(37,99,235,.22), transparent 55%),
    var(--green-950);
  display: flex; align-items: center; justify-content: center; padding: 28px 16px;
}

.bezel-note { position: fixed; left: 26px; bottom: 22px; color: #8294B4; font-size: 12px; max-width: 230px; line-height: 1.5; }
.bezel-note a { color: var(--leaf); }
.bezel-note b { color: #C2CEDF; }

/* ---------- phone bezel ---------- */
.phone {
  width: 396px; height: 826px; flex: none;
  background: #0A0F18; border-radius: 52px; padding: 11px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.06) inset;
  position: relative;
}
.phone::after { content: ""; position: absolute; right: -2.5px; top: 180px; width: 3px; height: 64px; border-radius: 3px; background: #1A2233; }
.screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--canvas); display: flex; flex-direction: column; position: relative; }

/* status bar */
.statusbar { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 8px 26px 0; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); position: relative; }
.statusbar .notch { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 112px; height: 27px; border-radius: 16px; background: #0A0F18; }
.statusbar .sb-right { display: flex; gap: 5px; align-items: center; }
.statusbar .ic { width: 15px; height: 15px; }

/* app viewport */
.app { flex: 1; overflow-y: auto; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; font-size: 16px; }
.app-pad { padding: 14px 16px 120px; }

/* app header */
.app-h { padding: 10px 16px 12px; display: flex; align-items: center; gap: 10px; }
.app-h .back { display: flex; padding: 8px; margin-left: -8px; color: var(--ink); border-radius: 10px; }
.app-h .back:active { background: var(--line-2); }
.app-h h1 { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.app-h .sub { font-size: 12.5px; color: var(--mut); }
.app-brand { display: flex; align-items: center; gap: 8px; }
.app-brand .wm { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.app-brand .wm em { font-style: normal; color: var(--green-700); }

/* XL buttons */
.btn-xl {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px;
  min-height: 56px; border-radius: var(--r-l); font-size: 17px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: background 150ms ease, transform 160ms var(--ease-out);
}
.btn-xl .ic { width: 21px; height: 21px; }
.btn-xl.pri { background: var(--green-700); color: #fff; }
.btn-xl.pri:active { background: var(--green-800); transform: scale(.98); }
.btn-xl.gold { background: var(--leaf); color: #3a2400; }
.btn-xl.gold:active { transform: scale(.98); }
.btn-xl.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-xl.ghost:active { background: var(--surface-2); transform: scale(.98); }
.btn-xl[disabled], .btn-xl.is-disabled { background: var(--line-2); color: var(--mut-2); cursor: not-allowed; }

/* item rows */
.item-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; margin-bottom: 10px; }
.item-row .ir-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item-row .ir-name { font-weight: 700; font-size: 16px; }

/* bottom sticky CTA */
.sticky-cta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 10px)); background: linear-gradient(transparent, var(--canvas) 38%); }

/* bottom nav */
.bnav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 19; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 8px)); }
.bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--mut-2); text-decoration: none !important; padding: 5px 0; }
.bnav a .ic { width: 22px; height: 22px; }
.bnav a.is-active { color: var(--green-700); }

/* AI chat composer (homeowner advisor) */
.composer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 8px)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.composer .input { min-height: 46px; border-radius: var(--r-pill); }
.composer .send-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--green-700); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.composer .send-btn:active { transform: scale(.95); }
.composer .send-btn .ic { width: 20px; height: 20px; }

/* signature pad */
.sig-wrap { background: var(--surface); border: 1.5px dashed var(--mut-2); border-radius: var(--r-l); position: relative; overflow: hidden; }
.sig-wrap canvas { width: 100%; height: 180px; touch-action: none; display: block; }
.sig-wrap .sig-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--mut-2); font-family: var(--serif); font-style: italic; font-size: 17px; pointer-events: none; }
.sig-wrap .sig-line { position: absolute; left: 24px; right: 24px; bottom: 34px; border-bottom: 1.5px solid var(--line); pointer-events: none; }
.sig-wrap.has-ink .sig-hint { display: none; }

/* photo / upload tile */
.photo-tile { border: 1.5px dashed var(--mut-2); border-radius: var(--r-l); background: var(--surface); min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--mut); font-weight: 600; cursor: pointer; position: relative; overflow: hidden; }
.photo-tile .ic { width: 26px; height: 26px; }

/* success screen */
.success-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 22px 120px; text-align: center; }
.success-ring { width: 96px; height: 96px; border-radius: 50%; background: var(--green-700); display: flex; align-items: center; justify-content: center; color: #fff; animation: ring-pop .5s cubic-bezier(.2,1.4,.4,1) both; box-shadow: 0 0 0 14px var(--green-100); }
.success-ring .ic { width: 44px; height: 44px; }
@keyframes ring-pop { from { transform: scale(.5); opacity: 0; } }

/* ---------- full-bleed on real phones ---------- */
@media (max-width: 520px) {
  body.driver { padding: 0; display: block; background: var(--canvas); }
  .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; background: var(--canvas); }
  .phone::after { display: none; }
  .screen { border-radius: 0; }
  .statusbar { display: none; }
  .bezel-note { display: none; }
}
