/* AddToWallet for Simply Schedule Appointments: admin skin, scoped to the plugin's page. */
.ssa-atw {
	--atw-ink: #111827;
	--atw-muted: #6b7280;
	--atw-line: #e5e7eb;
	--atw-soft: #f9fafb;
	--atw-accent: #5b3fd6;
	--atw-accent-hover: #4a30bd;
	--atw-accent-soft: #f1edff;
	--atw-accent-line: #d9cffd;
	--atw-brand: #7c5cf5;
	--atw-radius: 12px;
	max-width: 1280px;
	color: var(--atw-ink);
	font-size: 14px;
}
.ssa-atw *, .ssa-atw *::before, .ssa-atw *::after { box-sizing: border-box; }

/* Header and tabs. */
.ssa-atw-header { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.ssa-atw-header h1 { margin: 0; padding: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.ssa-atw-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.ssa-atw-pill { flex: none; margin-left: 4px; padding: 3px 10px; border-radius: 999px; background: #f3f4f6; color: var(--atw-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ssa-atw-pill-ok { background: #ecfdf5; color: #047857; }
.ssa-atw-pill-ok::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #10b981; vertical-align: middle; }
.ssa-atw .wp-header-end { visibility: hidden; margin: 0; }
.ssa-atw-tabs { display: flex; gap: 4px; margin: 16px 0 20px; border-bottom: 1px solid var(--atw-line); overflow-x: auto; scrollbar-width: none; }
.ssa-atw-tab { flex: none; white-space: nowrap; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--atw-muted); font-weight: 600; text-decoration: none; }
.ssa-atw-tab:hover { color: var(--atw-ink); }
.ssa-atw-tab:focus { box-shadow: none; outline: 2px solid var(--atw-accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.ssa-atw-tab[aria-current="page"] { color: var(--atw-ink); border-bottom-color: var(--atw-accent); }
.ssa-atw .notice { margin: 0 0 16px; border-radius: 8px; }
.ssa-atw .notice.inline { margin: 0 0 16px; }

/* Cards and panels. */
.ssa-atw-card,
.ssa-atw-panel {
	margin: 0 0 16px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--atw-line);
	border-radius: var(--atw-radius);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.ssa-atw-card h2,
.ssa-atw-panel h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--atw-ink); }
.ssa-atw-card > p:first-of-type { margin-top: 6px; }
.ssa-atw-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.ssa-atw-card-head h2 { margin: 0; }
.ssa-atw-card > h2 + .ssa-atw-control { margin-top: 14px; }
.ssa-atw-panel-head { margin-bottom: 16px; }
.ssa-atw-panel-head p { margin: 0; color: var(--atw-muted); }
.ssa-atw-panel-body { display: grid; gap: 18px; }
.ssa-atw-help { display: block; margin-top: 6px; color: var(--atw-muted); font-size: 12.5px; line-height: 1.5; }
.ssa-atw-muted { color: var(--atw-muted); }
.ssa-atw-small { font-size: 12.5px; }
.ssa-atw-block { display: block; margin-top: 3px; }
.ssa-atw-flush { margin: 2px 0 0; }
.ssa-atw-mt { margin-top: 18px; }
.ssa-atw-warn { color: #b45309; }
.ssa-atw-link { color: var(--atw-accent); font-weight: 600; text-decoration: none; }
.ssa-atw-link:hover { color: var(--atw-accent-hover); text-decoration: underline; }
.ssa-atw a:not(.ssa-atw-btn):not(.ssa-atw-tab) { color: var(--atw-accent); }

/* Pass design: form on the left, a pinned preview on the right, actions along the bottom. */
.ssa-atw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ssa-atw-preview-pane { position: sticky; top: 46px; padding: 18px; background: var(--atw-soft); border: 1px solid var(--atw-line); border-radius: var(--atw-radius); }
.ssa-atw-stage { display: flex; justify-content: center; }
.ssa-atw-preview-note { text-align: center; }
@media (max-width: 1100px) {
	.ssa-atw-layout { grid-template-columns: 1fr; }
	.ssa-atw-preview-pane { position: static; order: -1; }
}
.ssa-atw-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; background: var(--atw-accent-soft); border: 1px solid var(--atw-accent-line); border-radius: var(--atw-radius); }
.ssa-atw-banner > div { flex: 1; }
.ssa-atw-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--atw-brand); box-shadow: 0 0 0 4px #e4dcff; }
.ssa-atw-actionbar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(6px);
	border: 1px solid var(--atw-line);
	border-radius: var(--atw-radius);
	box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
}
.ssa-atw-actionbar .ssa-atw-help { margin: 0; }
.ssa-atw-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Controls. */
.ssa-atw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.ssa-atw-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; }
.ssa-atw-control { min-width: 0; }
.ssa-atw-narrow { max-width: 460px; }
.ssa-atw-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.ssa-atw input[type="text"],
.ssa-atw input[type="email"],
.ssa-atw input[type="password"],
.ssa-atw input[type="search"],
.ssa-atw textarea,
.ssa-atw select {
	width: 100%;
	max-width: none;
	min-height: 38px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background-color: #fff;
	color: var(--atw-ink);
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.ssa-atw select { padding-right: 28px; }
.ssa-atw input[type="text"]:focus,
.ssa-atw input[type="email"]:focus,
.ssa-atw input[type="password"]:focus,
.ssa-atw input[type="search"]:focus,
.ssa-atw textarea:focus,
.ssa-atw select:focus { border-color: var(--atw-accent); box-shadow: 0 0 0 3px rgba(91, 63, 214, 0.18); outline: none; }
.ssa-atw input::placeholder, .ssa-atw textarea::placeholder { color: #9ca3af; }
.ssa-atw input[type="checkbox"]:focus, .ssa-atw input[type="radio"]:focus { border-color: var(--atw-accent); box-shadow: 0 0 0 1px var(--atw-accent); }
.ssa-atw-fields { display: grid; gap: 8px; }
.ssa-atw-field { display: grid; grid-template-columns: 2fr 3fr; gap: 8px; align-items: start; }
.ssa-atw-check-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.ssa-atw-check-label input { margin: 0; }

/* "+ Data Field" beside inputs that take booking details. */
.ssa-atw-with-insert { display: flex; gap: 6px; align-items: flex-start; min-width: 0; width: 100%; }
.ssa-atw-with-insert > input,
.ssa-atw-with-insert > textarea { flex: 1; min-width: 0; }
.ssa-atw .ssa-atw-insert { flex: none; width: auto; max-width: 118px; padding: 0 24px 0 10px; background-color: var(--atw-accent-soft); border-color: var(--atw-accent-line); color: var(--atw-accent); font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: none; }
.ssa-atw .ssa-atw-insert:hover { border-color: var(--atw-accent); }

/* Brand: name, logo and colour on one row. */
.ssa-atw-brand-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.ssa-atw-brand-name { flex: 1 1 200px; min-width: 0; }
.ssa-atw-brand-logo { flex: 0 0 auto; }
.ssa-atw-brand-colour { flex: 0 1 auto; min-width: 0; }
.ssa-atw-logo-pick { display: flex; align-items: center; gap: 8px; }
.ssa-atw-logo-box { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px dashed #d1d5db; border-radius: 8px; background: var(--atw-soft); overflow: hidden; }
.ssa-atw-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.ssa-atw-logo-box img[hidden] { display: none; }
.ssa-atw-colour { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ssa-atw-colour input[type="color"] { width: 42px; height: 38px; padding: 3px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; }
.ssa-atw .ssa-atw-colour input.ssa-atw-hex { width: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: lowercase; }
.ssa-atw-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.ssa-atw-swatch { width: 20px; height: 20px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #d1d5db; cursor: pointer; }
.ssa-atw-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--atw-ink); }

/* Segmented choice (barcode). */
.ssa-atw-choice { display: inline-flex; flex-wrap: wrap; justify-self: start; padding: 3px; background: #f3f4f6; border-radius: 10px; }
.ssa-atw-choice label { position: relative; cursor: pointer; }
.ssa-atw-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ssa-atw-choice span { display: block; padding: 6px 14px; border-radius: 8px; color: var(--atw-muted); font-weight: 600; }
.ssa-atw-choice input:checked + span { background: #fff; color: var(--atw-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.ssa-atw-choice input:focus-visible + span { outline: 2px solid var(--atw-accent); }

/* Back sections. */
.ssa-atw-back { display: grid; gap: 10px; }
.ssa-atw-back:empty { display: none; }
.ssa-atw-back-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 2fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--atw-line); border-radius: 10px; background: var(--atw-soft); }
.ssa-atw-back-row textarea { height: 38px; min-height: 38px; max-height: 220px; resize: none; overflow-y: hidden; }
.ssa-atw .ssa-atw-back-remove { display: inline-flex; align-items: center; align-self: start; min-height: 38px; padding: 0 8px; border: 0; background: none; color: #b91c1c; font-weight: 600; cursor: pointer; }
.ssa-atw .ssa-atw-back-remove:hover { text-decoration: underline; }
.ssa-atw #ssa-atw-back-add { justify-self: start; }
@media (max-width: 782px) {
	.ssa-atw-back-row, .ssa-atw-field { grid-template-columns: 1fr; }
}

/* Buttons. */
.ssa-atw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
}
.ssa-atw-btn-primary { border: 1px solid var(--atw-accent); background: var(--atw-accent); color: #fff; }
.ssa-atw-btn-primary:hover,
.ssa-atw-btn-primary:focus { border-color: var(--atw-accent-hover); background: var(--atw-accent-hover); color: #fff; }
.ssa-atw-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.ssa-atw-btn-ghost { border: 1px solid #d1d5db; background: #fff; color: var(--atw-ink); }
.ssa-atw-btn-ghost:hover { border-color: #9ca3af; background: var(--atw-soft); color: var(--atw-ink); }
.ssa-atw a.ssa-atw-btn-ghost { color: var(--atw-ink); }
.ssa-atw-btn:focus-visible { outline: 2px solid var(--atw-accent); outline-offset: 2px; box-shadow: none; }
.ssa-atw-btn[hidden] { display: none; }
.ssa-atw-btn-text { padding: 6px 4px; border: 0; background: none; color: var(--atw-muted); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.ssa-atw-btn-text:hover { color: var(--atw-ink); text-decoration: underline; }
.ssa-atw-btn-text[hidden] { display: none; }
.ssa-atw .ssa-atw-danger { color: #b91c1c; }

/* Connect. */
.ssa-atw-connect { max-width: 640px; }
.ssa-atw-key-form { margin-top: 14px; }
.ssa-atw-key-row { display: flex; gap: 8px; }
.ssa-atw-key-row input { flex: 1; min-width: 0; }

/* Account. */
.ssa-atw-kv { display: grid; margin: 4px 0 12px; }
.ssa-atw-kv > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--atw-line); }
.ssa-atw-kv > div:first-child { border-top: 0; }
.ssa-atw-kv dt { color: var(--atw-muted); font-weight: 600; }
.ssa-atw-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ssa-atw-credits { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ssa-atw-credit-count { font-size: 18px; font-weight: 700; line-height: 1; }
.ssa-atw-credits .ssa-atw-block { flex-basis: 100%; }
.ssa-atw-low { color: #b45309; font-weight: 600; }
.ssa-atw-replace { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--atw-line); border-radius: 10px; background: var(--atw-soft); }
.ssa-atw-replace summary { font-weight: 600; cursor: pointer; }
.ssa-atw-replace .ssa-atw-key-form { margin-top: 10px; max-width: 560px; }
.ssa-atw-disconnect { margin-top: 12px; }
.ssa-atw-options { display: grid; gap: 8px; margin-top: 12px; }
.ssa-atw-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--atw-line); border-radius: 10px; cursor: pointer; }
.ssa-atw-option:hover { border-color: #c4b5fd; }
.ssa-atw-option input { margin: 2px 0 0; }
.ssa-atw-option:has(input:checked) { border-color: var(--atw-accent-line); background: var(--atw-accent-soft); }

/* Tables and status pills. */
.ssa-atw code,
.ssa-atw-chip { padding: 2px 6px; border-radius: 6px; background: #f3f4f6; font-size: 12.5px; }
.ssa-atw-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: #374151; white-space: nowrap; }
.ssa-atw-table-wrap { overflow-x: auto; }
.ssa-atw table.widefat { border: 1px solid var(--atw-line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: none; }
.ssa-atw table.widefat thead th { padding: 10px 14px; background: var(--atw-soft); color: var(--atw-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid var(--atw-line); }
.ssa-atw table.widefat td { padding: 13px 14px; border-top: 1px solid var(--atw-line); vertical-align: top; }
.ssa-atw table.widefat tbody tr:first-child td { border-top: 0; }
.ssa-atw table.widefat tbody tr:hover td { background: #fcfcfd; }
.ssa-atw-empty { color: var(--atw-muted); text-align: center; padding: 28px 14px !important; }
.ssa-atw-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f3f4f6; color: var(--atw-muted); white-space: nowrap; }
.ssa-atw-status-ok { background: #ecfdf5; color: #047857; }
.ssa-atw-status-muted { background: #f3f4f6; color: #4b5563; }
.ssa-atw-status-failed { background: #fef2f2; color: #b91c1c; }
.ssa-atw-status-booked { background: var(--atw-accent-soft); color: var(--atw-accent); }
.ssa-atw-status-canceled { background: #fef2f2; color: #b91c1c; }
.ssa-atw-status-pending, .ssa-atw-status-pending_payment { background: #fffbeb; color: #b45309; }
.ssa-atw-pass-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ssa-atw-pass-link code { color: var(--atw-accent); font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ssa-atw-pass-link:hover code { background: #e5e7eb; }
.ssa-atw-search { display: flex; gap: 8px; align-items: center; }
.ssa-atw .ssa-atw-search input[type="search"] { width: 280px; }
.ssa-atw .tablenav { height: auto; margin: 12px 0 0; }
.ssa-atw .tablenav-pages { float: none; display: flex; justify-content: flex-end; }
.ssa-atw .tablenav-pages .page-numbers { display: inline-block; min-width: 30px; margin-left: 4px; padding: 4px 8px; border: 1px solid var(--atw-line); border-radius: 6px; text-align: center; text-decoration: none; }
.ssa-atw .tablenav-pages .page-numbers.current { border-color: var(--atw-accent); background: var(--atw-accent); color: #fff; }

/* Help. */
.ssa-atw-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ssa-atw-help-col > .ssa-atw-card:last-child { margin-bottom: 0; }
.ssa-atw-int-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ssa-atw-int-head h2 { margin: 0; font-size: 16px; }
.ssa-atw-int-head p { margin: 2px 0 0; }
.ssa-atw-int-stats { margin: 14px 0 0; font-weight: 600; }
.ssa-atw-int-stats .ssa-atw-link { margin-left: 6px; }
.ssa-atw-subhead { margin: 16px 0 6px; color: var(--atw-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ssa-atw-where { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.ssa-atw-where li { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.ssa-atw-check { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ssa-atw-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 0; }
.ssa-atw-badges img { display: block; width: auto; height: 40px; }
.ssa-atw-int .ssa-atw-actions { margin-top: 14px; }
.ssa-atw-steps { margin: 12px 0 0 18px; }
.ssa-atw-steps li { margin-bottom: 8px; padding-left: 4px; }
.ssa-atw-faq { border-top: 1px solid var(--atw-line); }
.ssa-atw-faq:first-of-type { margin-top: 12px; }
.ssa-atw-faq summary { padding: 12px 0; font-weight: 600; cursor: pointer; }
.ssa-atw-faq p { margin: 0 0 12px; color: var(--atw-muted); line-height: 1.55; }
.ssa-atw-faq-foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--atw-line); }
.ssa-atw-support-form p { margin: 12px 0 0; }
.ssa-atw-support-form textarea { min-height: 120px; }
.ssa-atw-support-send { display: flex; align-items: center; gap: 12px; }

/* Hero image cards. */
.ssa-atw-hero-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin: 0 0 4px; padding: 0; list-style: none; }
.ssa-atw-hero-card, .ssa-atw-hero-add { position: relative; margin: 0; }
.ssa-atw-hero-open, #ssa-atw-hero-add { display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; padding: 8px 8px 10px; border: 1px solid var(--atw-line); border-radius: 10px; background: #fff; color: var(--atw-ink); font: inherit; text-align: left; cursor: pointer; }
.ssa-atw-hero-open:hover, #ssa-atw-hero-add:hover { border-color: #9ca3af; }
.ssa-atw-hero-open:focus-visible, #ssa-atw-hero-add:focus-visible { outline: 2px solid var(--atw-accent); outline-offset: 2px; }
.ssa-atw-strip-box { position: relative; display: block; width: 100%; aspect-ratio: 1125 / 294; border: 1px solid var(--atw-line); border-radius: 8px; background: var(--atw-soft); overflow: hidden; }
.ssa-atw-strip-empty { position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; font-size: 24px; color: #9ca3af; transform: translate(-50%, -50%); }
.ssa-atw-strip-empty[hidden] { display: none; }
[data-card-img], [data-ed-img] { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
[data-card-img][hidden], [data-ed-img][hidden] { display: none; }
.ssa-atw-hero-label { font-size: 13px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ssa-atw-hero-sub { margin-top: -4px; color: var(--atw-muted); font-size: 12px; }
#ssa-atw-hero-add { align-items: center; justify-content: center; min-height: 100px; border-style: dashed; background: var(--atw-soft); text-align: center; }
.ssa-atw-hero-plus { font-size: 22px; line-height: 1; color: var(--atw-accent); }
#ssa-atw-hero-add .ssa-atw-hero-sub { margin-top: 0; }
.ssa-atw-hero-add[hidden] { display: none; }

/* The hero card editor. */
.ssa-atw-dialog { width: min(520px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25); color: var(--atw-ink); }
.ssa-atw-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.ssa-atw-dialog-title { margin: 0; font-size: 16px; }
.ssa-atw-hero-editor-image { display: grid; gap: 10px; margin: 14px 0; }
.ssa-atw-hero-when { margin: 0 0 6px; }
.ssa-atw-hero-when[hidden] { display: none; }
.ssa-atw-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.ssa-atw-dialog-actions > span { display: flex; gap: 8px; margin-left: auto; }

/* Previews: the pass as Apple Wallet and Google Wallet draw it. */
.ssa-atw-pv-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.ssa-atw-seg { display: inline-flex; padding: 2px; background: #eceef1; border-radius: 999px; }
.ssa-atw-seg-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #50575e; cursor: pointer; }
.ssa-atw-seg-btn[aria-pressed="true"] { background: #fff; color: #1d2327; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.ssa-atw-seg-btn:focus-visible { outline: 2px solid var(--atw-accent); outline-offset: 1px; }
.ssa-atw-face { display: none; }
.ssa-atw-stage[data-platform="apple"][data-side="front"] [data-face="apple-front"],
.ssa-atw-stage[data-platform="apple"][data-side="back"] [data-face="apple-back"],
.ssa-atw-stage[data-platform="google"][data-side="front"] [data-face="google-front"],
.ssa-atw-stage[data-platform="google"][data-side="back"] [data-face="google-back"] { display: flex; }
/* The flip only plays for people who have not asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
	.ssa-atw-stage .ssa-atw-face { animation: ssa-atw-flip 0.25s ease-out; }
}
@keyframes ssa-atw-flip { from { transform: perspective(800px) rotateY(-12deg); opacity: 0.4; } to { transform: none; opacity: 1; } }

.ssa-atw-apple,
.ssa-atw-google {
	width: 270px;
	min-height: 420px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	flex-direction: column;
	font-size: 13px;
	overflow-wrap: anywhere;
}
.ssa-atw-apple { padding: 14px; border-radius: 12px; gap: 16px; }
.ssa-atw-apple-top { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ssa-atw-apple-logo { width: 30px; height: 30px; flex: none; border-radius: 4px; overflow: hidden; }
.ssa-atw-apple-title { font-size: 21px; font-weight: 600; line-height: 1.2; }
.ssa-atw-apple-title:empty { display: none; }
.ssa-atw-apple-fields { display: flex; justify-content: space-between; gap: 12px; }
.ssa-atw-apple-fields > div { min-width: 0; }
.ssa-atw-apple-fields > div:nth-child(3) { text-align: right; }
.ssa-atw-apple-fields .ssa-atw-pv-label,
.ssa-atw-apple-fields .ssa-atw-pv-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssa-atw-apple .ssa-atw-pv-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; }
.ssa-atw-apple .ssa-atw-pv-code { margin-top: auto; }
.ssa-atw-apple-strip { position: relative; flex: none; align-self: stretch; margin: 0 -14px; aspect-ratio: 1125 / 294; overflow: hidden; }
.ssa-atw-apple-strip + .ssa-atw-pass-header + .ssa-atw-apple-title,
.ssa-atw-apple-strip:not([hidden]) ~ .ssa-atw-apple-title { font-size: 17px; }

.ssa-atw-google { padding: 16px 16px 20px; border-radius: 22px; gap: 10px; }
.ssa-atw-google-top { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ssa-atw-google-logo { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; background: #fff; }
.ssa-atw-google-rule { height: 1px; margin: 2px -16px 4px; background: currentColor; opacity: 0.18; }
.ssa-atw-google-title { font-size: 22px; font-weight: 600; line-height: 1.2; }
.ssa-atw-google-title:empty { display: none; }
.ssa-atw-google-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 6px; }
.ssa-atw-google-fields > div:nth-child(2) { text-align: center; }
.ssa-atw-google-fields > div:nth-child(3) { text-align: right; }
.ssa-atw-google .ssa-atw-pv-label { font-size: 10px; opacity: 0.85; }
.ssa-atw-google .ssa-atw-pv-code { margin: 10px 0 2px; }
.ssa-atw-google-hero { position: relative; flex: none; align-self: stretch; margin: auto -16px -20px; aspect-ratio: 1125 / 294; overflow: hidden; border-radius: 0 0 22px 22px; }
[data-strip] { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ssa-atw-apple-strip[hidden], .ssa-atw-google-hero[hidden] { display: none; }

.ssa-atw-logo-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ssa-atw-logo-initial { display: grid; place-items: center; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.2); font-weight: 700; font-size: 1.2em; }
.ssa-atw-logo-img[hidden], .ssa-atw-logo-initial[hidden] { display: none; }
.ssa-atw-pv-value { font-size: 13px; }

.ssa-atw-pv-code { align-self: center; display: flex; flex-direction: column; align-items: center; }
.ssa-atw-pv-code-art { padding: 8px; background: #fff; border-radius: 6px; line-height: 0; }
.ssa-atw-pv-code-art:empty, .ssa-atw-pv-code[data-code="NONE"] { display: none; }
.ssa-atw-pv-code-art svg { display: block; width: 112px; height: auto; }
.ssa-atw-pv-code[data-code="PDF_417"] svg, .ssa-atw-pv-code[data-code="CODE_128"] svg { width: 190px; }

/* The header line: small, above the title, as both wallets draw it. Hidden when empty. */
.ssa-atw-pass-header { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; opacity: 0.85; }
.ssa-atw-pass-header:empty { display: none; }
.ssa-atw-apple > .ssa-atw-pass-header + .ssa-atw-apple-title { margin-top: -13px; }
.ssa-atw-google-header { margin-top: 6px; }
.ssa-atw-google-header + .ssa-atw-google-title { margin-top: -6px; }

/* Apple Wallet back: the pass details screen. */
.ssa-atw-apple-back { width: 270px; min-height: 420px; padding: 14px; border-radius: 12px; background: #f2f2f7; color: #1d2327; flex-direction: column; gap: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); font-size: 13px; }
.ssa-atw-mini.ssa-atw-apple { display: flex; width: 124px; min-height: 0; margin: 0 auto; padding: 8px; gap: 6px; border-radius: 8px; font-size: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.ssa-atw-mini .ssa-atw-apple-logo { width: 14px; height: 14px; }
.ssa-atw-mini .ssa-atw-apple-title { font-size: 11px; }
.ssa-atw-mini > .ssa-atw-pass-header { font-size: 7px; }
.ssa-atw-mini > .ssa-atw-pass-header + .ssa-atw-apple-title { margin-top: -5px; }
.ssa-atw-ios-title { text-align: center; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.ssa-atw-ios-card { background: #fff; border-radius: 12px; overflow: hidden; }
.ssa-atw-ios-card[hidden] { display: none; }
.ssa-atw-ios-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; }
.ssa-atw-ios-row + .ssa-atw-ios-row { border-top: 1px solid #e5e5ea; }
.ssa-atw-ios-section { display: block; }
.ssa-atw-ios-section > div:first-child { font-size: 11px; color: #6b7280; }
.ssa-atw-ios-switch { position: relative; width: 36px; height: 21px; flex: none; border-radius: 999px; background: #34c759; }
.ssa-atw-ios-switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; }
.ssa-atw-ios-remove { padding: 9px 12px; color: #d63638; font-weight: 600; }
.ssa-atw .ssa-atw-back-link { color: #0a84ff; overflow-wrap: anywhere; text-decoration: none; }
.ssa-atw-back-text { color: #3c434a; white-space: pre-line; overflow-wrap: anywhere; }

/* Google Wallet back: the Details sheet. */
.ssa-atw-google-back { width: 270px; min-height: 420px; padding: 18px; border-radius: 22px; background: #fff; color: #1d2327; flex-direction: column; gap: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); font-size: 13px; }
.ssa-atw-gd-heading { font-size: 16px; font-weight: 700; }
.ssa-atw-gd-logo { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; color: #1d2327; }
.ssa-atw-gd-logo .ssa-atw-logo-initial { background: #f0f0f1; }
.ssa-atw-gd-title { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.ssa-atw-gd-item { margin-top: 10px; }
.ssa-atw-gd-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ssa-atw-gd-section { font-weight: 700; }
.ssa-atw-gd-note { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #e5e5ea; font-size: 11px; color: #646970; }

@media (max-width: 600px) {
	.ssa-atw-kv > div { grid-template-columns: 1fr; gap: 2px; }
	.ssa-atw-header h1 { font-size: 18px; }
	.ssa-atw-key-row, .ssa-atw-search { flex-wrap: wrap; }
	.ssa-atw .ssa-atw-search input[type="search"] { width: 100%; }
	.ssa-atw-actionbar { flex-direction: column; align-items: stretch; }
}
