/*
 * 123PassportPhoto photo tools - the /tools/ hub. Loaded after pp-tool.css,
 * whose .pk-tool tokens it uses. Each card shows the tool's sample photo, the
 * right half as the tool would leave it (a CSS stand-in for the real effect).
 * Before/after pictures (.is-cmp) have a divider at --x: pp-hub.js lets you
 * drag it, and sweeps it left and right while a mouse is over the card.
 */
.pk-hub { padding-bottom: 8px; }
.pk-hub .pk-title { text-align: start; }
.pk-hub-bar {
  position: sticky; top: 0; z-index: 20; background: #fff; margin: 14px 0 6px; padding: 10px 0;
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
}
.pk-hub-bar.is-stuck { box-shadow: 0 8px 14px -12px rgba(23, 33, 46, .35); }
.pk-hub-search { position: relative; flex: 0 1 300px; margin: 0; font-weight: 400; }
.pk-hub-search svg { position: absolute; inset-inline-start: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #8a97a6; pointer-events: none; }
.pk-hub-search input {
  width: 100%; height: 42px; border: 1px solid #d5dce5; border-radius: 12px; padding: 0 12px; padding-inline-start: 38px;
  font-size: 15px; color: #17212e; background: #f6f8fb; -webkit-appearance: none; appearance: none;
}
.pk-hub-search input:focus { outline: none; border-color: #2465b8; background: #fff; box-shadow: 0 0 0 3px rgba(36, 101, 184, .15); }
.pk-hub-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.pk-hub-chips button {
  border: 1px solid #d5dce5; background: #fff; color: #3b4a5c; border-radius: 999px; padding: 7px 14px; font-size: 14px;
  font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
}
.pk-hub-chips button:hover { border-color: #2465b8; color: #2465b8; }
.pk-hub-chips button[aria-pressed=true] { background: #17212e; border-color: #17212e; color: #fff; }
.pk-hub-chips button:focus-visible, .pk-card:focus-visible { outline: 3px solid rgba(36, 101, 184, .45); outline-offset: 2px; }

.pk-hub-sec { margin: 18px 0 6px; }
.pk-hub-sec h2 { font-size: 19px; font-weight: 700; color: #17212e; margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.pk-hub-sec h2 small { font-size: 13px; font-weight: 600; color: #8a97a6; }
.pk-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

.pk-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e8ef; border-radius: 16px; overflow: hidden;
  color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.pk-card:hover, .pk-card:focus { text-decoration: none; color: inherit; }
.pk-card:hover { transform: translateY(-2px); border-color: #cdd6e1; box-shadow: 0 12px 24px -14px rgba(23, 33, 46, .35); }
.pk-card-body { padding: 12px 14px 14px; display: block; }
.pk-card-body b { display: block; font-size: 15.5px; color: #17212e; margin-bottom: 3px; }
.pk-card-body span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.45; color: #5c6b7c; }

/* The picture: 4:3, the photo, an "after" copy of it, and overlays. */
.pk-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9edf2; }
.pk-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pk-pic .a { clip-path: inset(0 0 0 50%); }
.pk-pic.is-cmp { --x: 50%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.pk-pic.is-cmp .a, .pk-pic.is-cmp .vig { clip-path: inset(0 0 0 var(--x)); }
.pk-pic.is-flip .a { transform: scaleX(-1); clip-path: inset(0 var(--x) 0 0); }
.pk-pic .cut { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .35); }
.pk-pic .cut::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317212e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); cursor: ew-resize;
}
.pk-pic.is-dragging { cursor: ew-resize; }
.pk-pic.is-rotate { background: #e9edf2; }
.pk-pic.is-rotate img { inset: 11% 12%; width: 76%; height: 78%; border-radius: 4px; transform: rotate(-8deg); box-shadow: 0 8px 18px -8px rgba(23, 33, 46, .55); transition: transform .45s ease; }
.pk-card:hover .pk-pic.is-rotate img { transform: rotate(0deg); }
.pk-pic.is-rotate .guides { inset: 11% 12%; }
.pk-pic .ov { position: absolute; inset: 0; pointer-events: none; }
.pk-pic .crop { position: absolute; box-shadow: 0 0 0 999px rgba(10, 16, 24, .5); border: 2px solid #fff; }
.pk-pic .crop::before, .pk-pic .crop::after { content: ""; position: absolute; inset: 0; }
.pk-pic .crop::before { border-left: 1px solid rgba(255, 255, 255, .55); border-right: 1px solid rgba(255, 255, 255, .55); left: 33.33%; right: 33.33%; }
.pk-pic .crop::after { border-top: 1px solid rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(255, 255, 255, .55); top: 33.33%; bottom: 33.33%; }
.pk-pic .ring { position: absolute; left: 50%; top: 50%; width: 66%; aspect-ratio: 1; transform: translate(-50%, -46%); border-radius: 50%; box-shadow: 0 0 0 999px rgba(10, 16, 24, .55); border: 2px solid #fff; }
.pk-pic .grid { position: absolute; inset: 0; background:
  linear-gradient(90deg, transparent calc(33.33% - 2px), #fff calc(33.33% - 2px), #fff calc(33.33% + 2px), transparent calc(33.33% + 2px), transparent calc(66.66% - 2px), #fff calc(66.66% - 2px), #fff calc(66.66% + 2px), transparent calc(66.66% + 2px)),
  linear-gradient(180deg, transparent calc(50% - 2px), #fff calc(50% - 2px), #fff calc(50% + 2px), transparent calc(50% + 2px)); }
.pk-pic .guides { position: absolute; inset: 0; background:
  linear-gradient(90deg, transparent 33.2%, rgba(255, 255, 255, .6) 33.2%, rgba(255, 255, 255, .6) 33.6%, transparent 33.6%, transparent 66.4%, rgba(255, 255, 255, .6) 66.4%, rgba(255, 255, 255, .6) 66.8%, transparent 66.8%),
  linear-gradient(180deg, transparent 33.2%, rgba(255, 255, 255, .6) 33.2%, rgba(255, 255, 255, .6) 33.6%, transparent 33.6%, transparent 66.4%, rgba(255, 255, 255, .6) 66.4%, rgba(255, 255, 255, .6) 66.8%, transparent 66.8%); }
.pk-pic .vig { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(0, 0, 0, .78) 100%); }
.pk-pic .box { position: absolute; left: 22%; top: 22%; right: 22%; bottom: 22%; border: 2px dashed #fff; border-radius: 4px; box-shadow: 0 0 0 999px rgba(10, 16, 24, .32); }
.pk-pic .box::after { content: ""; position: absolute; right: -7px; bottom: -7px; width: 12px; height: 12px; background: #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.pk-pic .tag {
  position: absolute; right: 8px; bottom: 8px; background: rgba(23, 33, 46, .82); color: #fff; border-radius: 8px; padding: 4px 8px;
  font-size: 12px; font-weight: 700; line-height: 1.3; direction: ltr; unicode-bidi: isolate; white-space: nowrap;
}
.pk-pic .tag.is-go { background: #138a43; }
.pk-pic .wm { position: absolute; right: 8%; bottom: 9%; color: rgba(255, 255, 255, .85); font-weight: 800; font-size: 19px; letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); direction: ltr; }
.pk-pic .wm.is-diag { right: auto; bottom: auto; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 28px; color: rgba(255, 255, 255, .38); text-shadow: none; }
.pk-pic .emo { position: absolute; font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.pk-pic .sw { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, .92); border-radius: 10px; }
.pk-pic .sw i { flex: 1; height: 22px; border-radius: 6px; }
.pk-pic .tiles { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; padding: 4px; background: #fff; }
.pk-pic .tiles img { position: static; border-radius: 6px; }
.pk-pic .tiles img:first-child { grid-row: span 2; }
.pk-pic.is-qr { background: #eef3fa; }
.pk-pic.is-qr img { inset: 12% 30%; width: 40%; height: auto; aspect-ratio: 1; margin: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 16px -8px rgba(23, 33, 46, .45); }
.pk-pic .area { clip-path: inset(14% 28% 10% 30% round 6px); }
.pk-card:hover .pk-pic .area { clip-path: inset(14% 28% 10% 30% round 6px); }
.pk-pic .dot { position: absolute; width: 7%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #0d0a0a 35%, #2a1f1f 70%, transparent 72%); }

.pk-hub-empty { padding: 28px 0; color: #5c6b7c; font-size: 15px; text-align: center; }
.pk-hub .pk-private { justify-content: center; margin: 22px 0 6px; }

@media (max-width: 767px) {
  .pk-hub .pk-title { font-size: 24px; }
  .pk-hub-bar { margin: 8px -15px 4px; padding: 8px 15px; gap: 8px; }
  .pk-hub-search { flex: 1 1 100%; }
  .pk-hub-search input { font-size: 16px; }
  .pk-hub-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -15px; padding: 0 15px 2px; -webkit-overflow-scrolling: touch; }
  .pk-hub-chips::-webkit-scrollbar { display: none; }
  .pk-hub-chips button { padding: 7px 13px; }
  .pk-hub-sec { margin-top: 14px; }
  .pk-hub-sec h2 { font-size: 17px; margin-bottom: 10px; }
  .pk-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pk-card { border-radius: 14px; }
  .pk-card-body { padding: 9px 10px 11px; }
  .pk-card-body b { font-size: 14.5px; }
  .pk-card-body span { font-size: 12.5px; }
  .pk-pic .wm { font-size: 15px; }
  .pk-pic .wm.is-diag { font-size: 20px; }
  .pk-pic .emo { font-size: 22px; }
  .pk-pic .sw i { height: 16px; }
  .pk-pic .tag { font-size: 11px; right: 6px; bottom: 6px; }
  .pk-pic .cut::after { width: 26px; height: 26px; margin: -13px 0 0 -13px; background-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-card, .pk-pic.is-rotate img { transition: none; }
}
.pk-card[hidden], .pk-hub-sec[hidden], .pk-hub-empty[hidden] { display: none; }
.pk-hub-top { display: block; height: 1px; margin-bottom: -1px; }
/* Right-to-left pages read the picture the other way: before on the right. */
[dir=rtl] .pk-pic.is-cmp .a, [dir=rtl] .pk-pic.is-cmp .vig { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
[dir=rtl] .pk-pic.is-flip .a { clip-path: inset(0 0 0 calc(100% - var(--x))); }
.pk-pic .brush { position: absolute; left: 30%; top: 58%; width: 13%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .35); }
