/* door_hanger_maker: rules for this tool only. Shared pieces are in ../office_tools.css.
   Read by marketing/office_tools/door_hanger_maker (via _head); classes start .ot-dh-.
   The editing panel sits left of a warm "stage" with the flat preview and the
   design check, as in the approved mock-up; both stack on phones. */

/* The shared classes set display, which would beat the hidden attribute. */
.ot-dh-tool [hidden] { display: none !important; }

.ot-dh-panel { flex: 1 1 380px; min-width: 0; max-width: 460px; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.ot-dh-stage { flex: 999 1 520px; min-width: 0; background: #e9e4dc; display: flex; flex-direction: column; }
@media (max-width: 920px) {
  .ot-dh-panel { max-width: none; border-right: 0; border-bottom: 1px solid var(--border); }
}

.ot-dh-tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; }
.ot-dh-tab { flex: 1 0 auto; min-height: 52px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; padding: 0 12px; cursor: pointer; }
.ot-dh-tab[aria-selected="true"] { color: var(--primary-dark); border-bottom-color: var(--primary); }
.ot-dh-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.ot-dh-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.ot-dh-downloads { margin-top: auto; padding: 16px 22px 22px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 600px) {
  .ot-dh-body { padding: 18px 16px; }
  .ot-dh-downloads { padding: 16px; }
}

.ot-dh-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ot-dh-formats .ot-pill { justify-content: center; padding: 0 6px; font-size: 14px; white-space: nowrap; }
.ot-dh-designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ot-dh-design { border: 1px solid var(--border-hover); border-radius: var(--radius-lg); background: var(--surface); padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 12px; color: var(--gray-700); cursor: pointer; min-width: 0; }
.ot-dh-design[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.ot-dh-mini { width: 34px; height: 84px; border-radius: 4px; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.ot-dh-mini::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 9999px; background: #e9e4dc; }
.ot-dh-mini-bold { background: linear-gradient(#0f766e 0 45%, #fff 45%); }
.ot-dh-mini-clean { background: #fff; border: 1px solid #e7e5e4; box-sizing: border-box; }
.ot-dh-mini-neighborly { background: linear-gradient(#fff 0 60%, #fde68a 60%); }
.ot-dh-mini-night { background: #1c1917; }

.ot-dh-swatch-teal { background: #0f766e; }
.ot-dh-swatch-navy { background: #294887; }
.ot-dh-swatch-forest { background: #166534; }
.ot-dh-swatch-brick { background: #b91c1c; }
.ot-dh-swatch-amber { background: #b45309; }
.ot-dh-custom { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text-secondary); }
.ot-dh-custom:focus-within { outline: 2px solid var(--primary); }
.ot-dh-custom.is-selected { border-width: 3px; outline: 2px solid var(--primary-dark); outline-style: solid; color: transparent; }

.ot-dh-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ot-dh-two .ot-btn { padding: 0 10px; }
.ot-dh-area { padding: 10px 12px; line-height: 1.4; resize: vertical; min-height: 64px; }
.ot-dh-scheme { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--text); }
.ot-dh-qr-png { align-self: flex-start; }

/* Stage: toolbar, then the sheets and the design check side by side. */
.ot-dh-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.ot-dh-seg { display: inline-flex; background: var(--surface); border-radius: var(--radius-md); padding: 4px; gap: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.ot-dh-seg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.ot-dh-seg button[aria-pressed="true"] { background: var(--gray-900, #1c1917); color: #fff; font-weight: 600; }
.ot-dh-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.ot-dh-view { flex: 1; display: flex; flex-wrap: wrap; gap: 20px; padding: 4px 18px 24px; align-items: flex-start; min-width: 0; }
.ot-dh-sheets { flex: 999 1 300px; min-width: 0; display: flex; justify-content: center; align-items: flex-start; gap: 20px; overflow-x: auto; padding: 8px 4px 12px; }
.ot-dh-sheets.is-actual { justify-content: flex-start; }
.ot-dh-figure { margin: 0; flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ot-dh-figure figcaption { font-size: 13px; color: #57534e; }
.ot-dh-sheet { line-height: 0; }
.ot-dh-sheet svg { display: block; border-radius: 4px; background: #fff; box-shadow: 0 18px 30px -8px rgba(41, 37, 36, 0.35), 0 2px 4px rgba(0, 0, 0, 0.08); }

.ot-dh-aside { flex: 1 1 220px; max-width: 300px; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
@media (max-width: 600px) { .ot-dh-aside { max-width: none; } .ot-dh-view { padding: 4px 12px 20px; } }
.ot-dh-card { background: var(--surface); border-radius: var(--radius-lg); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); font-size: 13px; color: var(--gray-700); }
.ot-dh-card p { margin: 0; }
.ot-section h2.ot-dh-card-title { font-size: 13px; font-weight: 700; margin: 0 0 8px; letter-spacing: 0; color: var(--text); }
.ot-dh-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ot-dh-checks li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.ot-dh-check-mark { flex: none; width: 18px; height: 18px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--success); margin-top: 1px; }
.ot-dh-checks li.is-warn { color: #92400e; }
.ot-dh-checks li.is-warn .ot-dh-check-mark { background: #b45309; }

/* How to print */
.ot-dh-howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ot-dh-howto ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--gray-700); line-height: 1.5; }
.ot-dh-howto .ot-card p { margin-top: 10px; }
