/* SiteProof Team website: additions to the shared portal styles (shared/app.css). */

.fake-banner { margin: 0; padding: 4px 12px; background: var(--warn-bg); color: var(--warn-text); text-align: center; font-size: 12px; }

/* ---- Sign-in and join ---- */
.signin-form { display: flex; flex-direction: column; gap: 8px; text-align: left; margin: 20px 0 8px; }
.signin-form label { color: var(--muted); font-size: 12px; }
.signin-form input {
  font: inherit;
  font-size: 16px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.signin-form input.code-input {
  font: 600 26px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .3em;
  text-align: center;
}
.signin-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---- Top bar and company ---- */
.user-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.company-slot label, .company-slot > .muted:first-child { width: 100%; }
.company-slot select { flex: 1; min-width: 0; font: inherit; padding: 4px 6px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.company-slot strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.role-label { white-space: nowrap; }
#company-notice { margin: 0 0 12px; }
#readonly-note { margin: 0 0 8px; }

.crew-label { font-size: 11px; font-weight: 400; color: var(--accent); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.crew-label.private { color: var(--muted); }

/* ---- Images drawn on canvases (rotation + markup) ---- */
.tile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-thumb canvas { width: 64px; height: 64px; object-fit: cover; display: block; }
.panel-image-button { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.panel-canvas { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.panel-canvas:not(.drawn) { aspect-ratio: 4 / 3; background: var(--surface-2); }
.viewer { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.viewer::backdrop { background: rgba(0, 0, 0, .85); }
.viewer-canvas { display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); object-fit: contain; }
.viewer-close { position: fixed; top: 12px; right: 12px; background: rgba(0, 0, 0, .6); color: #fff; border-color: transparent; }
.downloads button { align-self: flex-start; }
.downloads p { margin: 4px 0 0; width: 100%; }

/* ---- Dialog checkboxes ---- */
.dialog-checks { border: 1px solid var(--line); border-radius: var(--radius); margin: 0; padding: 6px 10px; max-height: 40vh; overflow-y: auto; }
.dialog-checks legend { color: var(--muted); font-size: 12px; padding: 0 4px; }
.dialog-checks label { display: flex; gap: 6px; align-items: center; padding: 3px 0; color: var(--text); font-size: 14px; }
.dialog-checks input { width: auto; margin: 0; }

/* ---- Company dialog ---- */
.admin-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
.admin-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.admin-body { min-height: 200px; }
.admin-body > div > .primary { margin-bottom: 12px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 4px 6px; }
.admin-table td { border-top: 1px solid var(--line); padding: 6px; vertical-align: middle; }
.admin-table select { font: inherit; padding: 3px 6px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.invite-code { font: 600 16px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .1em; }
.crew { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 10px 0; }
.crew-head { display: flex; align-items: center; gap: 8px; }
.crew-head h3 { margin: 0; font-size: 15px; }
.crew-head .spacer { flex: 1; }
.crew-members { border: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.crew-members legend { color: var(--muted); font-size: 12px; padding: 0; margin-bottom: 4px; }
.crew-member { display: flex; align-items: center; gap: 4px; }

/* ---- Markup editor ---- */
.markup-open { margin-top: 8px; }
.markup-editor {
  width: min(1200px, calc(100vw - 16px));
  height: calc(100vh - 16px);
  max-width: none;
  max-height: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.markup-editor[open] { display: flex; flex-direction: column; gap: 6px; }
.markup-editor::backdrop { background: rgba(0, 0, 0, .7); }
.markup-head { display: flex; align-items: center; gap: 8px; }
.markup-head h2 { margin: 0; font-size: 18px; }
.markup-head .spacer { flex: 1; }
.markup-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #111; border-radius: var(--radius); overflow: hidden; }
.markup-canvas { display: block; max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; }
.markup-canvas:focus { outline: none; }
.markup-status { margin: 0; min-height: 1.3em; font-size: 13px; }
.markup-status.warn { color: var(--danger); }
.markup-tools, .markup-options, .markup-style { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Fixed heights: the canvas must not move under the pointer when the options change mid-drag. */
.markup-options { min-height: 34px; }
.markup-tools button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.markup-gap { width: 8px; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--line); }
.swatch[aria-pressed="true"] { border: 3px solid var(--accent); box-shadow: 0 0 0 2px var(--surface) inset; }
.markup-hint { margin: 0; min-height: 2.9em; }
.markup-updating { margin: 6px 0 0; padding: 6px 10px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); font-size: 13px; }
