/* tickmi.com/thiep-moi-online — công cụ tạo thiệp mời online. Khung trang dùng lại qr.css (qb-*); ở đây chỉ phần riêng. */
.iv-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.iv-form .iv-full { grid-column: 1 / -1; }
.iv-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.iv-form label small { font-weight: 500; color: var(--muted); }
.iv-form input, .iv-form textarea, .iv-names { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 500; font-size: 15px; background: #fcfcfd; color: var(--ink); width: 100%; min-width: 0; }
.iv-form textarea, .iv-names { resize: vertical; min-height: 64px; }
.iv-form input:focus, .iv-form textarea:focus, .iv-names:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,92,64,.18); }
.iv-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 12px; }
.iv-photo-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.iv-photo-row.is-on .iv-photo-btn { border-color: var(--brand); color: var(--brand-dark); }
.iv-theme { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; }
.iv-theme canvas { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 10px; display: block; background: var(--soft); border: 2px solid transparent; box-shadow: 0 6px 16px -8px rgba(0,0,0,.4); transition: transform .15s, border-color .15s; }
.iv-theme b { font-weight: 600; color: var(--muted); }
.iv-theme.is-on canvas { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(255,92,64,.22), 0 10px 22px -10px rgba(0,0,0,.45); }
.iv-theme.is-on b { color: var(--ink); }
.iv-theme:focus-visible canvas { outline: 2px solid var(--brand); outline-offset: 2px; }
.iv-canvas { padding: 16px; }
.iv-canvas canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(24,24,27,.45); background: var(--soft); }
[data-ready="0"] .iv-canvas canvas { animation: iv-pulse 1.2s ease-in-out infinite; }
@keyframes iv-pulse { 50% { opacity: .6; } }
.iv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.iv-msg { min-height: 1.2em; font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.iv-hint { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.iv-count { font-weight: 700; font-size: 14px; }
.iv-links { margin-top: 12px; display: grid; gap: 10px; }
.iv-table { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.iv-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.iv-table th, .iv-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.iv-table th { position: sticky; top: 0; background: #fafafa; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.iv-table td:last-child { text-align: right; white-space: nowrap; }
.iv-mini { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand-dark); cursor: pointer; }
.iv-mini:hover { border-color: var(--brand); }
@media (max-width: 860px) {
  .qb-tool.iv-tool { grid-template-columns: 1fr; }
  .iv-tool .qb-preview { order: -1; position: static; }
  .iv-canvas { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .iv-form { grid-template-columns: 1fr; }
  .iv-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
/* Trang người nhận */
.iv-view { padding: 28px 0 64px; background: linear-gradient(180deg, var(--soft), #fff 70%); min-height: 70vh; }
.iv-view .wrap { max-width: 560px; }
.iv-view .iv-canvas { padding: 0; }
.iv-view .iv-actions { justify-content: center; margin: 18px 0 8px; }
.iv-view .iv-actions [hidden] { display: none; }
.iv-made { text-align: center; font-size: 14px; color: var(--muted); margin-top: 22px; }
.iv-made a { color: var(--brand-dark); font-weight: 600; }
.iv-empty { text-align: center; padding: 40px 0; }
.is-empty .iv-canvas, .is-empty .iv-actions { display: none; }
@media (prefers-reduced-motion: reduce) { .iv-theme canvas { transition: none; } [data-ready="0"] .iv-canvas canvas { animation: none; } }
.iv-when { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.iv-date { position: relative; display: block; }
.iv-date #iv-day { padding-right: 44px; }
.iv-cal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--brand-dark); cursor: pointer; display: grid; place-items: center; }
.iv-cal:hover { background: var(--soft); }
.iv-cal svg { width: 20px; height: 20px; }
#iv-picker { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.iv-form select { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 500; font-size: 15px; background: #fcfcfd; width: 100%; }
.iv-date.is-bad #iv-day { border-color: #d97706; }
.iv-theme { background: none; border: 0; padding: 0; font: inherit; }
.iv-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 2px 0 8px; }
.iv-occ { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.iv-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s; }
.iv-chip:hover { border-color: var(--brand-3); }
.iv-chip.is-on { background: var(--soft); border-color: var(--brand); color: var(--brand-dark); }
.iv-more span { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; border: 2px dashed var(--brand-3); display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--brand-dark); background: var(--soft); }
.iv-more:hover span { border-color: var(--brand); }
.iv-modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--radius); padding: 0; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.iv-modal::backdrop { background: rgba(24,24,27,.55); backdrop-filter: blur(3px); }
.iv-modal-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.iv-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f4f4f5; font-size: 22px; line-height: 1; cursor: pointer; }
.iv-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; padding: 20px; }
@media (max-width: 520px) { .iv-all { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; } }
.iv-calpop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 300px; max-width: calc(100vw - 48px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 48px -16px rgba(24,24,27,.3); padding: 12px; }
.iv-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.iv-cal-head b { font-size: 15px; }
.iv-cal-head button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #f4f4f5; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.iv-cal-head button:hover { background: var(--soft); color: var(--brand-dark); }
.iv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.iv-cal-w { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.iv-cal-grid button { height: 36px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.iv-cal-grid button:hover { background: var(--soft); }
.iv-cal-grid button.is-out { color: #c4c4cc; }
.iv-cal-grid button.is-today { box-shadow: inset 0 0 0 1.5px var(--brand-3); }
.iv-cal-grid button.is-sel { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 6px 14px -6px rgba(255,92,64,.6); }
.iv-cal-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.iv-cal-foot button { border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.iv-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c93a22' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; cursor: pointer; }
.qb-studio .qb-uses { margin-bottom: 0; }
.qb-studio .qb-uses + .hero-ctas { margin-top: 32px; justify-content: center; }
.iv-occ { display: grid; gap: 10px; }
.iv-occ-g { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.iv-occ-g > span { flex-basis: 100%; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.iv-all-g { grid-column: 1 / -1; margin: 4px 0 -4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.iv-app { display: flex; gap: 14px; align-items: center; margin: 22px auto 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.iv-app:hover { border-color: var(--brand-3); }
.iv-app img { border-radius: 12px; flex: none; }
.iv-app b { display: block; font-size: 15px; }
.iv-app small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.iv-app-alt { text-align: center; font-size: 13px; margin: 8px 0 0; }
.iv-app-alt a { color: var(--brand-dark); font-weight: 600; }
.is-empty .iv-app, .is-empty .iv-app-alt { display: none; }
.iv-form [hidden] { display: none; }
.iv-rsvp { margin-top: 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, var(--soft), #fff); border: 1px solid var(--brand-3); }
.iv-rsvp div { flex: 1 1 260px; min-width: 0; }
.iv-rsvp b { display: block; font-size: 15px; }
.iv-rsvp span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 4px; }
