/* Try-it-now BakPak that lives on the edge of the website. Desktop only. */

.demo { position: fixed; right: 0; top: 0; bottom: 0; width: 460px; pointer-events: none; z-index: 50; font-family: Inter, -apple-system, system-ui, sans-serif; }
@media (max-width: 820px), (hover: none) { .demo { display: none; } }

.demo-bag { position: absolute; right: 0; width: 100px; height: 242px; pointer-events: auto; cursor: pointer; user-select: none; }
.demo-bag img { width: 100%; height: 100%; object-fit: contain; object-position: right center; display: block; transform-origin: right center; transition: transform 0.15s; -webkit-user-drag: none; }
.demo-bag:hover img, .demo-bag.hover img { transform: scale(1.06); }
.demo-bag.bump img { animation: demoBump 0.4s; }
.demo-bag.ringing img { animation: demoRing 0.9s ease-in-out infinite; }
@keyframes demoBump { 25% { transform: rotate(-5deg) scale(1.06); } 55% { transform: rotate(3deg); } }
@keyframes demoRing { 8% { transform: translateX(-4px) rotate(-4deg); } 16% { transform: translateX(2px) rotate(3deg); } 24% { transform: translateX(-3px) rotate(-3deg); } 32%, 100% { transform: none; } }
.demo-bag .badge { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #e2443b; display: none; place-items: center; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.demo-bag.ringing .badge { display: grid; }

/* "Try me" speech bubble */
.demo-hint { position: absolute; right: 108px; width: 190px; padding: 10px 12px; border-radius: 14px; background: #1d3557; color: #fff; font-size: 13px; line-height: 1.4; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); pointer-events: auto; animation: demoFloat 2.4s ease-in-out infinite; }
.demo-hint b { display: block; font-family: Fredoka, Inter, sans-serif; font-size: 16px; color: #b5c42f; }
.demo-hint::after { content: ""; position: absolute; right: -7px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-right: 0; border-left-color: #1d3557; }
.demo-hint button { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: #9fb0c9; cursor: pointer; font-size: 13px; }
@keyframes demoFloat { 50% { transform: translateX(-5px); } }
.demo.used .demo-hint { display: none; }

/* toolbar */
.demo-bar { position: absolute; right: 6px; display: none; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: #fbfaf7; border: 1px solid #e7e4dc; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); pointer-events: auto; }
.demo.open .demo-bar { display: flex; }
.demo-bar button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; width: 32px; height: 30px; cursor: pointer; }
.demo-bar button:hover { background: rgba(42, 167, 176, 0.14); }
.demo-bar button img { width: 22px; height: 22px; }
.demo-timer { font: 600 11px Inter, sans-serif; color: #1d3f74; padding: 0 6px 0 4px; white-space: nowrap; }

/* item wheel */
.demo-slot { position: absolute; left: 0; top: 0; width: 140px; height: 92px; margin: -46px 0 0 -70px; pointer-events: auto; transition: transform 0.38s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.3s; }
.demo-card { position: relative; width: 100%; height: 100%; box-sizing: border-box; border-radius: 10px; background: #fff; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); overflow: hidden; cursor: pointer; transition: transform 0.15s; }
.demo-card:hover { transform: scale(1.06); }
.demo-slot.center .demo-card { box-shadow: 0 0 0 2px #3fc1c9, 0 8px 20px rgba(0, 0, 0, 0.3); }
.demo-card img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 7px; }
.demo-card .txt { height: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 12px; line-height: 1.35; color: #222; background: #fff8d6; border-radius: 7px; overflow: hidden; white-space: pre-wrap; word-wrap: break-word; }
.demo-card.reminder .txt { background: #ffe6dd; color: #4a1d12; }
.demo-card.file .txt { background: #eef0f3; }
.demo-card .kind { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8f99; margin-bottom: 2px; }
.demo-card.reminder .kind { color: #c2412d; }
.demo-card .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; cursor: pointer; display: none; }
.demo-card:hover .x { display: block; }
.demo-empty { width: 100%; height: 100%; box-sizing: border-box; padding: 12px; border-radius: 10px; background: rgba(29, 53, 87, 0.92); color: #e6edf7; font-size: 12px; text-align: center; display: grid; place-items: center; }

/* note / reminder editor */
.demo-detail { position: absolute; left: 14px; width: 290px; height: 330px; display: none; flex-direction: column; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3); overflow: hidden; pointer-events: auto; }
.demo.expanded .demo-detail { display: flex; animation: demoZoom 0.22s cubic-bezier(0.2, 1.3, 0.4, 1); }
.demo.expanded .demo-slot { opacity: 0.12 !important; pointer-events: none; }
@keyframes demoZoom { from { transform: translateX(120px) scale(0.4); opacity: 0; } }
.demo-detail .head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #1c1e24; color: #ddd; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.demo-detail .head span { flex: 1; }
.demo-detail .head button { border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.14); color: #fff; padding: 3px 8px; cursor: pointer; }
.demo-detail textarea { flex: 1; border: 0; outline: 0; resize: none; padding: 14px 16px; font: 14px/1.5 Inter, -apple-system, sans-serif; background: #fff8d6; color: #222; }
.demo-detail .body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #fff4ef; color: #2a1a14; }
.demo-detail .body textarea { flex: 0 0 90px; border: 1px solid #f0cfc3; border-radius: 10px; background: #fff; padding: 10px; }
.demo-detail .what { flex: 1; font-size: 18px; line-height: 1.4; white-space: pre-wrap; }
.demo-detail .when { font-size: 12px; font-weight: 700; color: #c2412d; text-transform: uppercase; letter-spacing: 0.05em; }
.demo-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-chips button { border: 1px solid #f0cfc3; background: #fff; color: #4a1d12; border-radius: 999px; padding: 4px 12px; font: 12px Inter, sans-serif; cursor: pointer; }
.demo-chips button.on { background: #e2443b; border-color: #e2443b; color: #fff; }
.demo-primary { margin-top: auto; border: 0; border-radius: 10px; padding: 10px; background: #e2443b; color: #fff; font: 600 14px Inter, sans-serif; cursor: pointer; }

/* "Try it" section */
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 820px) { .try { grid-template-columns: 1fr; } }
.try ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 17px; }
.try li { margin-bottom: 10px; }
.try li b { color: var(--ink); }
.drop-box { min-height: 230px; border: 2.5px dashed #9fb5c0; border-radius: 22px; background: var(--surface); display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); transition: background 0.2s, border-color 0.2s; }
.drop-box.over { background: color-mix(in srgb, var(--teal) 10%, var(--surface)); border-color: var(--teal); }
.drop-box img { max-width: 100%; max-height: 160px; border-radius: 10px; margin: 0 auto 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }
.drop-box .ok { color: var(--teal-deep); font-weight: 600; }
.try-mobile { display: none; color: var(--muted); }
@media (max-width: 820px), (hover: none) { .try-mobile { display: block; } .try .drop-box { display: none; } }
