/* Secret Santa generator: scoped additions to the cream, ink and gold free-tool shell. */
[data-pgt-secretsanta] .pgt-tool-ss { text-align: left; max-width: 900px; margin-inline: auto; overflow-wrap: anywhere; }
[data-pgt-secretsanta] .pgt-tool-ss *, [data-pgt-secretsanta] .pgt-tool-ss *::before { box-sizing: border-box; }
[data-pgt-secretsanta] .pgt-badge { color: #32260a; }
/* The shared shell makes container h2s inline-block; keep the badge on its own line above the card heading. */
.pgt-tool-ss > .pgt-badge { display: table; }
.pgt-tool-ss > h2 { margin-top: 12px; }
.pgt-tool-ss fieldset { border: 1px solid var(--pgt-line); border-radius: 12px; padding: 18px; margin: 20px 0; min-width: 0; }
.pgt-tool-ss legend { font-weight: 600; padding: 0 8px; }
.pgt-tool-ss .pgt-ss-field label, .pgt-ss-plan-controls label { display: block; font-size: 15px; font-weight: 600; }
.pgt-tool-ss textarea, .pgt-tool-ss select, .pgt-tool-ss input[type="number"], .pgt-tool-ss input[type="date"], .pgt-tool-ss input[type="text"] { display: block; width: 100%; min-height: 48px; margin-top: 7px; padding: 12px; border: 1px solid #8c8374; border-radius: 8px; background: #fff; color: #1a1a1a; font: inherit; font-size: 16px; }
.pgt-tool-ss textarea { min-height: 150px; line-height: 1.5; resize: vertical; }
.pgt-tool-ss #pgtSs-households, .pgt-tool-ss #pgtSs-lastYear { min-height: 96px; }
.pgt-tool-ss input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.pgt-ss-hint { display: block; font-size: 13px; line-height: 1.6; color: #595247; font-weight: 400; margin-top: 7px; }
.pgt-ss-count-live { display: block; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: #443511; }
.pgt-ss-more { margin-top: 16px; }
.pgt-ss-more summary, .pgt-ss-organizer summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: #443511; cursor: pointer; }
.pgt-ss-modes { display: grid; gap: 10px; }
.pgt-ss-mode { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 12px 16px; border: 1px solid #8c8374; border-radius: 12px; background: #fff; cursor: pointer; }
.pgt-ss-mode input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: #70550e; }
.pgt-ss-mode strong { display: block; }
.pgt-ss-mode small { display: block; font-size: 13.5px; color: #595247; }
.pgt-ss-mode:has(input:checked) { border: 2px solid #70550e; background: #fff8e5; }
.pgt-ss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pgt-ss-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pgt-ss-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pgt-ss-actions button { flex: 1 1 220px; margin-top: 0; }
[data-pgt-secretsanta] .pgt-btn:not(.pgt-btn-secondary) { background: #70550e; color: #fff; min-height: 48px; white-space: normal; }
[data-pgt-secretsanta] .pgt-btn-secondary { color: #443511; background: #fff8e5; border: 1px solid #8c742f; min-height: 48px; }
[data-pgt-secretsanta] :is(button, input, select, textarea, a, summary, section, h4, p):focus-visible { outline: 3px solid #285fa6; outline-offset: 4px; }
.pgt-tool-ss [aria-invalid="true"] { border: 2px solid #a32525; }
.pgt-tool-ss [hidden] { display: none !important; }
.pgt-tool-ss button:disabled { opacity: 0.55; cursor: not-allowed; }
.pgt-tool-ss .pgt-status { min-height: 3.4em; color: #443511; font-size: 14px; }
#pgtSsResult:not(:empty) { margin: 20px 0; padding: 22px; background: #fffaf0; border: 1px solid var(--pgt-line); border-radius: 14px; }
#pgtSsResult h3 { margin: 0 0 6px; font-size: 1.6rem; line-height: 1.25; }
#pgtSsResult h4 { margin: 24px 0 10px; font-size: 1.05rem; }
.pgt-ss-lead, .pgt-ss-count { margin: 0 0 10px; }
.pgt-ss-count { font-size: 14.5px; }
.pgt-ss-secret { margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; font-size: 14.5px; }
.pgt-ss-secret-ok { background: #eef6ec; color: #234d1e; }
.pgt-ss-secret-warn { background: #fff1e0; color: #6e3a07; }
.pgt-ss-givers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pgt-ss-giver { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #8c742f; border-radius: 10px; background: #fff; color: #1a1a1a; font: inherit; font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pgt-ss-giver[data-seen="true"] { background: #f3efe6; color: #595247; font-weight: 500; }
#pgtSsResult .pgt-ss-panel { margin-top: 12px; padding: 18px; background: #fff; border: 2px solid #8c742f; border-radius: 14px; text-align: center; }
#pgtSsResult .pgt-ss-panel-title { margin: 0 0 8px; }
.pgt-ss-match { margin: 6px 0 10px; font-size: 2rem; font-weight: 700; line-height: 1.2; color: #70550e; overflow-wrap: anywhere; }
.pgt-ss-details { font-weight: 600; }
.pgt-ss-panel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pgt-ss-panel-actions .pgt-btn { flex: 1 1 200px; margin-top: 0; }
.pgt-ss-progress { margin: 12px 0 0; font-weight: 600; color: #443511; }
.pgt-ss-organizer { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--pgt-line); }
.pgt-ss-organizer .pgt-btn { margin-top: 4px; }
/* Tables size by whole words and scroll inside .pgt-table-scroll instead of breaking names or numbers mid-word. */
.pgt-tool-ss table th, .pgt-tool-ss table td { overflow-wrap: break-word; }
.pgt-ss-table-live td:last-child { width: 1%; }
.pgt-ss-table caption, .pgt-ss-ref caption { margin-bottom: 8px; text-align: left; font-weight: 600; }
.pgt-ss-copy-one { min-height: 40px; padding: 6px 12px; border: 1px solid #8c742f; border-radius: 999px; background: #fff8e5; color: #443511; font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pgt-ss-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pgt-ss-code { margin: 18px 0 0; font-size: 14px; }
.pgt-ss-plan { margin-top: 24px; border-top: 1px solid var(--pgt-line); }
.pgt-ss-plan-controls { max-width: 320px; }
.pgt-ss-plan-out { min-height: 6em; }
.pgt-ss-plan-date { margin: 16px 0 6px; font-size: 1.2rem; }
.pgt-ss-plan-date.pgt-ss-tight, .pgt-ss-plan-date.pgt-ss-physical-late { color: #7a3d0a; }
.pgt-ss-plan-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.pgt-ss-plan-links .pgt-btn { margin: 0; }
#pgtSsCopyFallback { display: block; width: 100%; min-height: 220px; margin-top: 12px; }
#pgtSsPrintRoot { display: none; }
@media (max-width: 540px) {
  .pgt-ss-grid { grid-template-columns: 1fr; }
  .pgt-tool-ss fieldset { padding: 12px; }
  #pgtSsResult:not(:empty) { padding: 14px; }
  #pgtSsResult h3 { font-size: 1.35rem; }
  .pgt-ss-givers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgt-ss-actions button { width: 100%; }
  .pgt-ss-match { font-size: 1.6rem; }
  [data-pgt-secretsanta] .pgt-hero { padding-top: 34px; }
}
@media (max-width: 359px) {
  .pgt-ss-givers, .pgt-ss-money { grid-template-columns: 1fr; }
}
/* Printing slips: only the slips container (appended to <body> on demand) prints. */
@media print {
  html.pgt-ss-printing body > * { display: none !important; }
  html.pgt-ss-printing body > #pgtSsPrintRoot { display: block !important; color: #000; font-family: Georgia, 'Times New Roman', serif; }
  #pgtSsPrintRoot .pgt-ss-slips-note { margin: 0 0 10px; font-size: 11pt; }
  #pgtSsPrintRoot .pgt-ss-slips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  #pgtSsPrintRoot .pgt-ss-slip { break-inside: avoid; page-break-inside: avoid; display: grid; grid-template-rows: 1fr auto 1fr; min-height: 2.6in; margin: -0.5px; border: 1px solid #000; text-align: center; }
  #pgtSsPrintRoot .pgt-ss-slip p { margin: 0; padding: 12px; font-size: 14pt; overflow-wrap: anywhere; }
  #pgtSsPrintRoot .pgt-ss-slip-fold { padding: 2px !important; border-top: 1px dashed #555; font-size: 8pt !important; color: #555; }
  #pgtSsPrintRoot .pgt-ss-slip-in span { font-size: 10pt; }
}
