/* NFC TAGS - wizard (/create/nfc), phone setup (/nfc/setup), scan page (/t/...), My NFCs */

.nfc-page { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; }
.nfc-narrow { max-width: 640px; }
.nfc-page h2 { margin: 28px 0 12px; }
.nfc-page h3 { margin: 16px 0 8px; }
.nfc-lead { text-align: center; max-width: 620px; margin: 0 auto 24px; opacity: .85; line-height: 1.5; }
.nfc-small { font-size: 88%; opacity: .75; line-height: 1.45; }
.nfc-center { text-align: center; }
.nfc-warn { font-size: 90%; color: #b35900; }
.nfc-status { margin: 12px 0; min-height: 1.4em; text-align: center; }

.nfc-card { background: var(--back-primary, #fff); border: 1px solid var(--border-primary, #ddd); border-radius: 12px; padding: 18px 20px; margin: 14px 0; }
.nfc-blocked { text-align: center; }
.nfc-empty { text-align: center; padding: 32px 20px; }
.nfc-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.nfc-btn { display: inline-block; text-decoration: none; }

/* Progress */
#nfc-progress { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0 0 8px; flex-wrap: wrap; }
#nfc-progress li { padding: 6px 12px; border-radius: 16px; font-size: 85%; opacity: .5; border: 1px solid var(--border-primary, #ddd); }
#nfc-progress li.current { opacity: 1; font-weight: 700; border-color: #00acef; color: #00acef; }
#nfc-progress li.done { opacity: .8; }
#nfc-progress li.done::before { content: '\2713  '; }

/* Step 1 */
.nfc-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nfc-tier { border: 2px solid var(--border-primary, #ddd); border-radius: 12px; padding: 14px 16px; }
.nfc-tier p { margin: 8px 0 0; font-size: 90%; line-height: 1.45; }
.nfc-tier.selected { border-color: #00acef; }
.nfc-tier.disabled { opacity: .55; }
.nfc-pill { display: inline-block; margin-left: 6px; padding: 0 7px; font-size: 70%; font-weight: 700; line-height: 18px; color: #fff; background: #00acef; border-radius: 9px; vertical-align: middle; }
.nfc-pill-soon { background: #888; }
.nfc-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.nfc-template { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; border: 2px solid var(--border-primary, #ddd); border-radius: 12px; background: var(--back-primary, #fff); color: inherit; cursor: pointer; font: inherit; text-align: center; }
.nfc-template span { font-size: 34px; line-height: 1.1; }
.nfc-template small { opacity: .7; font-size: 80%; }
.nfc-template:hover, .nfc-template.selected { border-color: #00acef; }

/* Step 2 */
.nfc-field { margin-bottom: 16px; }
.nfc-field > label { display: block; font-weight: 700; margin-bottom: 6px; }
.nfc-field > label small { font-weight: normal; opacity: .7; }
.nfc-field input[type=text], .nfc-field input[type=number], .nfc-field textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; }
.nfc-field textarea { min-height: 80px; }
.nfc-field .nfc-short { width: 110px; }
.nfc-preview { display: block; max-width: 220px; max-height: 220px; margin-top: 10px; border-radius: 8px; object-fit: cover; }
.nfc-trait { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.nfc-trait .nfc-trait-key { flex: 0 0 34%; box-sizing: border-box; font-size: 92%; }
.nfc-trait label.nfc-trait-key { opacity: .8; }
.nfc-trait input.nfc-trait-key { padding: 8px 10px; }
.nfc-trait .nfc-trait-value { flex: 1; padding: 8px 10px; min-width: 0; }
.nfc-trait-del { border: none; background: none; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }

/* Step 3 */
.nfc-review-body { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.nfc-review-body img { width: 200px; max-width: 100%; border-radius: 8px; object-fit: cover; }
.nfc-review-body table, .nfc-traits-table { flex: 1; min-width: 240px; border-collapse: collapse; font-size: 94%; }
.nfc-review-body th, .nfc-traits-table th { text-align: left; vertical-align: top; padding: 5px 12px 5px 0; white-space: nowrap; opacity: .7; font-weight: normal; }
.nfc-review-body td, .nfc-traits-table td { padding: 5px 0; word-break: break-word; }
.nfc-recover { border-color: #f97316; }

/* Program panel */
.nfc-program { text-align: center; }
.nfc-qr { display: inline-block; padding: 10px; background: #fff; border-radius: 8px; margin: 6px 0; }
.nfc-qr img, .nfc-qr canvas { display: block; }
.nfc-wait { margin-top: 14px; font-size: 92%; opacity: .85; }
.nfc-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: nfc-spin .8s linear infinite; }
@keyframes nfc-spin { to { transform: rotate(360deg); } }
.nfc-done { border-color: #16a34a; }
.nfc-tips ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.5; }

/* Phone setup */
.nfc-object { display: flex; gap: 14px; align-items: center; }
.nfc-object img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.nfc-link { width: 100%; box-sizing: border-box; padding: 10px; font-family: monospace; font-size: 95%; }
.nfc-howto { padding-left: 20px; line-height: 1.6; }

/* Scan page */
.nfc-scan { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.nfc-scan-image img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--back-alternate, #f3f3f3); }
.nfc-scan-info h1 { margin: 10px 0 8px; }
.nfc-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 75%; font-weight: 700; letter-spacing: .03em; color: #fff; background: #00acef; }
.nfc-desc { white-space: pre-line; line-height: 1.5; }
.nfc-traits-table { width: 100%; margin: 14px 0; }
.nfc-traits-table tr { border-bottom: 1px solid var(--border-primary, #eee); }
.nfc-chain-table { font-size: 88%; }
.nfc-honest { font-size: 85%; opacity: .7; line-height: 1.45; border-left: 3px solid var(--border-primary, #ddd); padding-left: 10px; }
.nfc-revoked { border-color: #c0392b; }

/* My NFCs */
.nfc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 10px; }
.nfc-item { border: 1px solid var(--border-primary, #ddd); border-radius: 12px; overflow: hidden; background: var(--back-primary, #fff); }
.nfc-item > img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--back-alternate, #f3f3f3); }
.nfc-item-body { padding: 12px 14px 14px; }
.nfc-item-body h3 { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nfc-item-body p { margin: 4px 0; }
.nfc-item-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.nfc-state { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 82%; font-weight: 700; }
.nfc-state-active { background: #dcfce7; color: #166534; }
.nfc-state-pending { background: #fef3c7; color: #92400e; }
.nfc-state-revoked { background: #fee2e2; color: #991b1b; }

/* Modal (My NFCs) */
.nfc-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.nfc-modal[hidden] { display: none; }
.nfc-modal-card { position: relative; background: var(--back-primary, #fff); color: inherit; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; border-radius: 12px; padding: 22px 22px 18px; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.nfc-modal-close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 26px; cursor: pointer; color: inherit; opacity: .6; }

@media screen and (max-width: 600px) {
	.nfc-tiers { grid-template-columns: 1fr; }
	.nfc-trait .nfc-trait-key { flex-basis: 40%; }
	.nfc-actions .base, .nfc-actions .base-small { flex: 1; }
}
