/* journey: order details page and Messages. */
.jr-muted { color: var(--fp-muted, #616a63); font-size: 13px; line-height: 1.45; }
.jr-small { margin-top: 10px; font-size: 13px; }
.jr-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Order details: header */
.jr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .07); }
.jr-head-line { display: flex; align-items: center; gap: 10px; }
.jr-kind { font-size: 13px; color: var(--fp-muted, #616a63); }
.jr-when { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-top: 6px; }
.jr-head-actions { display: flex; gap: 8px; align-items: center; }
.jr-gate { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 14px; border-radius: 16px; background: #fdf3f4; border: 1px solid #f1c9ce; }
.jr-gate[hidden] { display: none; }

.jr-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.jr-main, .jr-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.jr-main > s-section, .jr-side > s-section { display: block; }
@media (max-width: 860px) { .jr-layout { grid-template-columns: 1fr; } }

.jr-items { list-style: none; margin: 0; padding: 0; }
.jr-item { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--fp-line, rgba(0, 0, 0, .08)); }
.jr-item:first-child { border-top: 0; padding-top: 2px; }
.jr-qty { font-weight: 650; color: var(--fp-green, #1f3d2b); background: var(--fp-soft, #f6f2ec); border-radius: 8px; text-align: center; height: 26px; line-height: 26px; font-size: 13px; }
.jr-gifts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jr-gift { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--fp-soft, #f6f2ec); font-size: 13px; }
.jr-balloon { margin-top: 3px; font-size: 13px; color: #8a3c4a; font-weight: 550; }
.jr-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--fp-line, rgba(0, 0, 0, .08)); }
.jr-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f4f6f8; }
.jr-note p { margin: 4px 0 0; white-space: pre-line; }
.jr-card { margin: 0; padding: 14px 16px; border-left: 3px solid var(--fp-blush, #e8a0a8); background: var(--fp-soft, #f6f2ec); border-radius: 0 12px 12px 0; font: italic 17px/1.5 Georgia, "New York", serif; white-space: pre-line; overflow-wrap: anywhere; }

.jr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.jr-photo { margin: 0; }
.jr-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: var(--fp-soft, #f6f2ec); }
.jr-photo figcaption { font-size: 12px; color: var(--fp-muted, #616a63); margin-top: 4px; }
.jr-empty-photos { margin: 0 0 12px; padding: 18px; border-radius: 12px; border: 1.5px dashed var(--fp-line, rgba(0, 0, 0, .14)); color: var(--fp-muted, #616a63); text-align: center; font-size: 13px; }

.jr-link { padding: 10px 12px; border-radius: 10px; background: var(--fp-soft, #f6f2ec); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; margin-bottom: 10px; }
.jr-dl { margin: 0; }
.jr-dl > div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 6px 0; font-size: 13px; }
.jr-dl dt { color: var(--fp-muted, #616a63); }
.jr-dl dd { margin: 0; overflow-wrap: anywhere; }
.jr-dl a { color: var(--fp-green, #1f3d2b); }

.jr-timeline { list-style: none; margin: 0; padding: 0; }
.jr-timeline li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; position: relative; padding-bottom: 12px; font-size: 13px; }
.jr-timeline li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -2px; width: 2px; background: var(--fp-line, rgba(0, 0, 0, .1)); }
.jr-timeline li.is-last::before { display: none; }
.jr-t-dot { width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; background: #fff; border: 2px solid var(--fp-green, #1f3d2b); position: relative; z-index: 1; }
.jr-t-photo .jr-t-dot { border-color: var(--fp-blush, #e8a0a8); }
.jr-timeline li.is-last .jr-t-dot { background: var(--fp-green, #1f3d2b); }

.jr-sent, .jr-out { list-style: none; margin: 0; padding: 0; }
.jr-sent li, .jr-out li { border-top: 1px solid var(--fp-line, rgba(0, 0, 0, .08)); }
.jr-sent li:first-child, .jr-out li:first-child { border-top: 0; }
.jr-sent summary, .jr-out summary { display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; list-style: none; font-size: 13px; }
.jr-sent summary::-webkit-details-marker, .jr-out summary::-webkit-details-marker { display: none; }
.jr-ch { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--fp-soft, #f6f2ec); display: grid; place-items: center; font-size: 14px; }
.jr-sent-main, .jr-out-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jr-sent-main .jr-muted, .jr-out-main .jr-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.jr-sent-body { margin: 0 0 10px 38px; padding: 10px 12px; border-radius: 10px; background: #f4f6f8; font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.jr-sent-body a { color: var(--fp-green, #1f3d2b); }
.jr-error { margin-top: 6px; color: #8e1f0b; font-weight: 550; }
.jr-order-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: #eef2ef; color: var(--fp-green, #1f3d2b); margin-left: 4px; }
.jr-out-main strong { display: inline; }
.jr-out-time { white-space: nowrap; font-size: 12px; }
.jr-out-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

/* Messages: template cards */
.jr-msgs { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.jr-msg { border: 1px solid var(--fp-line, rgba(0, 0, 0, .1)); border-radius: 14px; background: #fff; transition: box-shadow .2s; }
.jr-msg.is-open { box-shadow: 0 6px 22px rgba(31, 61, 43, .08); }
.jr-msg.is-off .jr-msg-title { color: var(--fp-muted, #616a63); }
.jr-msg.is-locked { opacity: .6; }
.jr-msg-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.jr-msg-toggle { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.jr-msg-toggle::after { content: "Edit words ›"; font-size: 12px; color: var(--fp-green, #1f3d2b); font-weight: 600; margin-top: 2px; }
.jr-msg.is-open .jr-msg-toggle::after { content: "Close"; }
.jr-msg-title { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.jr-msg-channels { white-space: nowrap; }
.jr-msg-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; padding: 4px 14px 16px; border-top: 1px solid var(--fp-line, rgba(0, 0, 0, .08)); padding-top: 14px; }
.jr-msg-body[hidden] { display: none; }
@media (max-width: 760px) { .jr-msg-body { grid-template-columns: 1fr; } }
.jr-edit { display: flex; flex-direction: column; gap: 10px; }
.jr-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 550; }
.jr-label.jr-inline { flex-direction: row; align-items: center; gap: 8px; }
.jr-input { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding: 9px 11px; border-radius: 10px; border: 1px solid #c9cccf; background: #fff; color: inherit; width: 100%; box-sizing: border-box; }
.jr-input:focus { outline: 2px solid #005bd3; outline-offset: 0; border-color: transparent; }
textarea.jr-input { resize: vertical; min-height: 120px; }
select.jr-input { width: auto; }
.jr-channels, .jr-people { display: flex; flex-wrap: wrap; gap: 8px; }
.jr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fp-line, rgba(0, 0, 0, .12)); font-size: 13px; cursor: pointer; background: #fff; }
.jr-pill:has(input:checked) { border-color: var(--fp-green, #1f3d2b); background: #eef4f0; }
.jr-pill input { margin: 0; accent-color: var(--fp-green, #1f3d2b); }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jr-chip { border: 1px dashed #b8c2bb; background: #f7faf8; color: var(--fp-green, #1f3d2b); border-radius: 8px; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.jr-chip:hover { background: #eaf2ec; }
.jr-row-actions { display: flex; gap: 16px; }
.jr-textbtn { border: 0; background: none; padding: 0; color: var(--fp-green, #1f3d2b); font-weight: 600; font-size: 13px; cursor: pointer; }
.jr-textbtn:hover { text-decoration: underline; }
.jr-danger { color: #8e1f0b; }

.jr-switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 44px; cursor: pointer; }
.jr-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.jr-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cfd4d1; transition: background .2s; }
.jr-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.jr-switch input:checked + span { background: #2e7d4f; }
.jr-switch input:checked + span::after { transform: translateX(18px); }
.jr-switch input:focus-visible + span { outline: 2px solid #005bd3; outline-offset: 2px; }
.jr-switch input:disabled + span { opacity: .5; }

/* Previews */
.jr-preview { display: flex; flex-direction: column; gap: 10px; }
.jr-preview-label { font-size: 12px; color: var(--fp-muted, #616a63); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.jr-phone { background: #f2f2f7; border-radius: 18px; padding: 10px 12px 14px; }
.jr-phone-top { text-align: center; font-size: 11px; color: #8e8e93; margin-bottom: 8px; }
.jr-bubble { max-width: 88%; background: #e9e9eb; color: #000; border-radius: 18px 18px 18px 4px; padding: 8px 12px; font: 14px/1.38 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: pre-line; overflow-wrap: anywhere; }
.jr-bubble + .jr-bubble { margin-top: 4px; }
.jr-bubble a { color: #0a63d1; }
.jr-bubble-photo { font-size: 12px; color: #6b6b70; }
.jr-mail { border: 1px solid var(--fp-line, rgba(0, 0, 0, .1)); border-radius: 12px; overflow: hidden; background: #fff; }
.jr-mail-subject { padding: 9px 12px; font-weight: 650; font-size: 13px; background: #fafafa; border-bottom: 1px solid var(--fp-line, rgba(0, 0, 0, .08)); }
.jr-mail-body { padding: 12px; font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.jr-mail-body a { color: var(--fp-green, #1f3d2b); }

/* Alerts */
.jr-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.jr-alert { border: 1px solid var(--fp-line, rgba(0, 0, 0, .1)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.jr-alert-head { display: flex; gap: 10px; align-items: flex-start; }
.jr-alert-head > div { flex: 1; }
.jr-alert-icon { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--fp-soft, #f6f2ec); display: grid; place-items: center; font-size: 16px; }
.jr-chats { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.jr-chats li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; }
.jr-connect { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jr-tg { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #eef6fb; font-size: 13px; }
.jr-tg img { border-radius: 10px; background: #fff; padding: 4px; flex: 0 0 auto; }
.jr-tg ol { margin: 0; padding-left: 18px; line-height: 1.6; min-width: 0; align-self: stretch; }
.jr-tg p { margin: 0; align-self: stretch; }
.jr-tg a { color: #0a63d1; overflow-wrap: anywhere; }

.jr-savebar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px 10px 16px; border-radius: 14px; background: #fff; color: #1f2a22; border: 1px solid rgba(0, 0, 0, .08); border-left: 4px solid #e8a0a8; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); font-size: 14px; font-weight: 600; }
.jr-savebar[hidden] { display: none; }
