/* fill_1099_nec: Fill out a 1099-NEC (/tools/fill-1099-nec,
   marketing/office_tools/fill_1099_nec.html.erb, controllers/fill_1099_controller.js).
   Prefix .ot-1099-. Shared pieces are in ../office_tools.css. */

.ot-1099 [hidden] { display: none !important; }
.ot-1099-section { padding-top: 8px; }

.ot-1099-news { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; color: #78350f; line-height: 1.5; }
.ot-1099-news strong { white-space: nowrap; }
.ot-1099-news a { color: #78350f; }

/* The steps column keeps its width; the preview takes the rest. */
.ot-1099 .ot-tool-main { flex: 1 1 440px; padding: 0; gap: 0; }
.ot-1099 .ot-tool-side { flex: 999 1 460px; background: var(--gray-200); }
.ot-1099-sticky { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 640px; margin: 0 auto; }

.ot-1099-steps { display: flex; border-bottom: 1px solid var(--border); }
.ot-1099-step { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ot-1099-step b { display: inline-flex; flex: none; width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--gray-200); color: var(--gray-700); font-size: 12px; align-items: center; justify-content: center; }
.ot-1099-step[aria-selected="true"] { color: var(--primary-dark); border-bottom-color: var(--primary); }
.ot-1099-step[aria-selected="true"] b { background: var(--primary); color: var(--text-inverse); }
.ot-1099-step:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.ot-1099-panel { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.ot-1099-pair { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 14px; }
.ot-1099-upper { text-transform: uppercase; }
.ot-1099 .ot-input[aria-invalid="true"], .ot-1099 .ot-select[aria-invalid="true"] { border-color: var(--danger); }

.ot-1099-tin { display: flex; gap: 8px; }
.ot-1099-tin .ot-input { flex: 1 1 auto; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.ot-1099-show { flex: none; }

.ot-1099-remember { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.ot-1099-remember .ot-hint { flex: 1 1 220px; }
.ot-1099-next { align-self: flex-start; }

.ot-1099-list, .ot-1099-review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ot-1099-row { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.ot-1099-row[aria-current="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ot-1099-row-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-1099-row-who span { color: var(--text-secondary); }
.ot-1099-row-amount { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.ot-1099-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: #fffbeb; color: #78350f; font-size: 12px; font-weight: 600; }
.ot-1099-tag.is-error { background: var(--danger-light, #fef2f2); color: var(--danger); }

.ot-1099-notes { display: flex; flex-direction: column; gap: 8px; }
.ot-1099-notes:empty { display: none; }
.ot-1099-note { margin: 0; border-radius: var(--radius-lg); padding: 10px 12px; font-size: 14px; background: #fffbeb; color: #78350f; }

.ot-1099-more { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 14px; }
.ot-1099-more summary { list-style: none; min-height: 44px; padding: 6px 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text); }
.ot-1099-more summary::-webkit-details-marker { display: none; }
.ot-1099-more summary::before { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.ot-1099-more[open] summary::before { transform: rotate(45deg); }
.ot-1099-more summary .ot-optional { font-weight: 400; color: var(--text-secondary); }
.ot-1099-more-body { display: flex; flex-direction: column; gap: 12px; padding: 0 0 14px; }
.ot-1099-check { align-items: flex-start; min-height: 44px; }
.ot-1099-check input { margin-top: 2px; }

.ot-1099-link { border: 0; background: none; padding: 0; min-height: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.ot-1099-link:hover { color: var(--primary-dark); }

.ot-1099-review li { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 14px; }
.ot-1099-review-who { min-width: 0; flex: 1 1 200px; }
.ot-1099-review-who strong { display: block; overflow-wrap: anywhere; }
.ot-1099-review-state { color: var(--text-secondary); }
.ot-1099-review-state.is-ready { color: #065f46; }
.ot-1099-review-state.is-error { color: var(--danger); }
.ot-1099-review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ot-1099 .ot-1099-heading { margin: 0 0 8px; font-size: 18px; line-height: 1.3; color: var(--text); }
.ot-1099-next-steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--gray-700); }

.ot-1099-preview-label { margin: 0; }
.ot-1099-preview { background: var(--surface); box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1)); aspect-ratio: 612 / 385; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ot-1099-preview canvas { display: block; width: 100% !important; height: auto !important; }
.ot-1099-preview-wait { padding: 16px; text-align: center; }

.ot-1099-irs { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; font-size: 13px; color: var(--gray-700); line-height: 1.5; }
.ot-1099-irs strong { color: var(--text); }

@media (max-width: 480px) {
  .ot-1099-panel { padding: 20px 16px; }
  .ot-1099 .ot-tool-side { padding: 20px 16px; }
  .ot-1099 .ot-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ot-1099-step { font-size: 13px; flex-direction: column; gap: 2px; padding: 6px 4px; }
}

/* An imported tax ID whose type (SSN or EIN) the payer still has to choose. */
.ot-1099 .ot-select.is-unconfirmed { border: 2px solid #d97706; background: #fffbeb; }
.ot-1099-warn { color: #78350f; }
