/* The tool around the preview. Gmail's own styles live in gmail.css. */
:root {
  --ink: #1b1b1b;
  --muted: #6b6b6b;
  --line: #dcdcdc;
  --field: #fff;
  --accent: #1b1b1b;
}
* { box-sizing: border-box; }
/* Stop phone browsers from enlarging text because the computer-size Gmail screen is so wide */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  display: grid;
  grid-template: auto minmax(0, 1fr) / 340px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  background: #e9e9e7;
  color: var(--ink);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.top { grid-area: 1 / 1; padding: 20px 20px 0; background: #f7f7f5; border-right: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.panel {
  grid-area: 2 / 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 20px 20px;
  overflow: auto;
  background: #f7f7f5;
  border-right: 1px solid var(--line);
}

label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 550; color: var(--muted); }
.grow { flex: 1 0 auto; }
.grow textarea { flex: 1; }
input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: 14px/1.4 inherit;
  font-family: inherit;
}
textarea { min-height: 180px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid #1b1b1b; outline-offset: -1px; border-color: transparent; }

.more { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
[hidden] { display: none !important; }
.hint { margin: -6px 0 0; font-size: 12px; color: var(--muted); }
.photo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; font-weight: 550; color: var(--muted); }
.photo span { width: 100%; }
.photo input { flex: 1; width: auto; padding: 0; border: 0; background: none; font-size: 12px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 600 14px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
button:hover { border-color: #b5b5b5; }
button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
button.primary:hover { background: #333; }
button.link { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; }
.status { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.status:empty { display: none; }

.stage { grid-area: 1 / 2 / 3 / 3; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 32px; overflow: hidden; }
.fit { flex: none; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 12px 32px rgba(0, 0, 0, .14); }
.screen { transform-origin: 0 0; }

/* Phones: title, then the preview, then the form, with the buttons pinned to the bottom of the screen. */
@media (max-width: 800px) {
  body { display: block; height: auto; }
  .top { padding: 14px 16px 0; background: none; border: 0; }
  .stage { padding: 12px 16px 20px; }
  .panel { overflow: visible; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); }
  .grow { flex: none; }
  textarea { min-height: 150px; }
  /* 16px text stops iPhone Safari from zooming in when a field is tapped */
  input, textarea, select { padding: 10px 12px; font-size: 16px; }
  .photo input { font-size: 14px; }
  button { min-height: 46px; font-size: 16px; }
  .actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247, 247, 245, .94);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
}
