/* App-specific styles that sit on top of the Industry design system
   (styles-industry.css). Everything here is either the phone frame the
   prototype rendered inside, or the small component classes the prototype
   declared inline. Colors/spacing still come from the design-system tokens. */

/* Cursive face for the rendered client signature in the preview. */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&display=swap');

.frame-wrap {
  margin: 0;
  min-height: 100vh;
  background: #dedee0;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.device {
  position: relative;
  width: 402px;
  height: 874px;
  max-width: 100vw;
  max-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
  border-radius: 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--color-bg);
}

/* Faux iOS status bar so the 58px top padding on each screen reads right. */
.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 55;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 30px 0;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.02em;
  pointer-events: none;
  color: var(--color-text);
}
.statusbar .dots { display: flex; gap: 4px; align-items: center; }
.statusbar .dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-text); display: block; opacity: 0.8;
}

/* On a real phone the app goes full-bleed. */
@media (max-width: 440px) {
  .frame-wrap { padding: 0; }
  .device {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Component classes the prototype declared inline. */
.stepbtn {
  width: 36px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  font-size: 20px; color: var(--color-accent);
  font-family: var(--font-heading); line-height: 1;
}
.stepbtn:active { background: var(--color-accent-100); }

.tabbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: none; cursor: pointer; padding: 6px 0;
  font-family: var(--font-heading); font-size: 10px; letter-spacing: 0.04em;
}

.actbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: none; cursor: pointer; padding: 4px;
  font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.02em;
  color: var(--color-accent-700);
}
.actbtn:active { opacity: 0.55; }

/* Read-only field (auto document number) — looks like an .input but static. */
.input-ro {
  display: flex;
  align-items: center;
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

/* Logo slot: the real logo image over a monogram fallback. */
.logo-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-slot .logo-mono {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  color: var(--color-accent-700);
  letter-spacing: 0.02em;
}
.logo-slot .logo-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Editable line item on the estimate editor. */
.lineitem {
  padding: 11px 0;
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lineitem-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lineitem-desc { flex: 1; min-width: 0; }
.lineitem-x {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-neutral-600);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.lineitem-x:active { background: var(--color-accent-100); }
.lineitem-bot {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.lineitem-bot label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.lineitem-bot label:first-child { width: 68px; }
.lineitem-bot label:nth-child(2) { width: 104px; }
.lineitem-bot .input { min-height: 34px; }
.lineitem-total {
  flex: 1;
  text-align: right;
  font-family: var(--font-heading);
  font-size: 17px;
  padding-bottom: 6px;
}
