/* 微信外卖菜单 / 聊天卡片 / 外卖小哥 CSS 插画 — 自 style.css 拆出 */
/* 外卖菜单 / 外卖卡片 */
.takeaway-menu-modal-content,
.takeaway-detail-modal-content {
    width: min(92vw, 388px);
    max-height: min(88vh, 690px);
}

/* 外卖搜索区域 */
.takeaway-search-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(92, 101, 112, 0.12);
    flex-shrink: 0;
}

.takeaway-search-bar {
    display: flex;
    gap: 8px;
}

.takeaway-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(92, 101, 112, 0.18);
    border-radius: 14px;
    background: #f4f7fb;
    color: #2f3b46;
    font-size: 14px;
    outline: none;
}

.takeaway-search-input:focus {
    border-color: rgba(92, 101, 112, 0.32);
    background: #ffffff;
}

.takeaway-tags-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.takeaway-tags-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3742;
}

.takeaway-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}

.takeaway-tag-btn {
    padding: 8px 12px;
    border: 1px solid rgba(92, 101, 112, 0.18);
    border-radius: 12px;
    background: #f4f7fb;
    color: #4a525c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.takeaway-tag-btn:hover {
    background: #e8ecf3;
}

.takeaway-tag-btn.is-selected {
    background: linear-gradient(135deg, #7b8fc7 0%, #5d6fa3 100%);
    border-color: rgba(93, 111, 163, 0.4);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(93, 111, 163, 0.25);
}

.takeaway-search-btn {
    padding: 10px 16px;
    border: 1px solid rgba(93, 111, 163, 0.28);
    border-radius: 14px;
    background: linear-gradient(135deg, #8b9dd4 0%, #6d7fb5 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(93, 111, 163, 0.2);
    transition: all 0.2s;
}

.takeaway-search-btn.is-loading,
.takeaway-search-btn:disabled {
    cursor: wait;
    opacity: 0.88;
    pointer-events: none;
}

.takeaway-search-btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4em;
}

.takeaway-search-btn:hover {
    background: linear-gradient(135deg, #7b8fc7 0%, #5d6fa3 100%);
    box-shadow: 0 6px 16px rgba(93, 111, 163, 0.3);
}

.takeaway-search-btn:active {
    transform: translateY(1px);
}

/* 店铺列表 */
.takeaway-shops-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
}

.takeaway-shops-list::-webkit-scrollbar {
    display: none;
}

.takeaway-shop-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(92, 101, 112, 0.14);
    border-radius: 16px;
    background: linear-gradient(135deg, #e8ecf5 0%, #f4f7fb 100%);
    cursor: pointer;
    transition: all 0.2s;
}

.takeaway-shop-card:hover {
    background: linear-gradient(135deg, #dde3f0 0%, #e8ecf5 100%);
    border-color: rgba(92, 101, 112, 0.22);
    box-shadow: 0 4px 12px rgba(92, 101, 112, 0.12);
}

.takeaway-shop-card:active {
    transform: scale(0.98);
}

.takeaway-shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.takeaway-shop-name {
    font-size: 15px;
    font-weight: 700;
    color: #2e3640;
}

.takeaway-shop-rating {
    font-size: 12px;
    color: #67707b;
}

.takeaway-shop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.takeaway-shop-tag {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(123, 143, 199, 0.15);
    color: #5d6fa3;
    font-size: 11px;
    font-weight: 600;
}

.takeaway-shop-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #5c6570;
}

.takeaway-shops-empty {
    padding: 40px 20px;
    text-align: center;
    color: #67707b;
    font-size: 14px;
}

/* 店铺详情 */
.takeaway-shop-info {
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8ecf5 0%, #f4f7fb 100%);
    margin-bottom: 14px;
    flex-shrink: 0;
}

.takeaway-shop-info-name {
    font-size: 16px;
    font-weight: 700;
    color: #2e3640;
    margin-bottom: 8px;
}

.takeaway-shop-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.takeaway-shop-info-detail {
    font-size: 12px;
    color: #5c6570;
    line-height: 1.5;
}

/* 数量选择器 */
.takeaway-quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.takeaway-quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(93, 111, 163, 0.28);
    border-radius: 8px;
    background: linear-gradient(135deg, #e8ecf5 0%, #f4f7fb 100%);
    color: #5d6fa3;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.takeaway-quantity-btn:hover {
    background: linear-gradient(135deg, #dde3f0 0%, #e8ecf5 100%);
    border-color: rgba(93, 111, 163, 0.4);
}

.takeaway-quantity-btn:active {
    transform: scale(0.95);
}

.takeaway-quantity-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.takeaway-quantity-value {
    min-width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2e3640;
}

/* 购物车按钮 */
.takeaway-cart-btn {
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(93, 111, 163, 0.28);
    border-radius: 14px;
    background: linear-gradient(135deg, #8b9dd4 0%, #6d7fb5 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(93, 111, 163, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.takeaway-cart-btn:hover {
    background: linear-gradient(135deg, #7b8fc7 0%, #5d6fa3 100%);
    box-shadow: 0 6px 16px rgba(93, 111, 163, 0.3);
}

.takeaway-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ff6b6b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

/* 购物车列表 */
.takeaway-cart-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
}

.takeaway-cart-list::-webkit-scrollbar {
    display: none;
}

.takeaway-cart-empty {
    padding: 60px 20px;
    text-align: center;
    color: #67707b;
    font-size: 14px;
}

.takeaway-cart-shop-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.takeaway-cart-shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8ecf5 0%, #f4f7fb 100%);
}

.takeaway-cart-shop-name {
    font-size: 14px;
    font-weight: 700;
    color: #2e3640;
}

.takeaway-cart-shop-clear {
    font-size: 12px;
    color: #7b8fc7;
    cursor: pointer;
    padding: 4px 8px;
}

.takeaway-cart-shop-clear:hover {
    color: #5d6fa3;
}

.takeaway-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(92, 101, 112, 0.14);
    border-radius: 14px;
    background: #f4f7fb;
}

.takeaway-cart-item-info {
    flex: 1;
    min-width: 0;
}

.takeaway-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2e3640;
    margin-bottom: 4px;
}

.takeaway-cart-item-price {
    font-size: 13px;
    color: #5c6570;
}

.takeaway-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.takeaway-cart-item-remove {
    font-size: 12px;
    color: #9ca5af;
    cursor: pointer;
    padding: 4px;
}

.takeaway-cart-item-remove:hover {
    color: #ff6b6b;
}

/* 菜品项优化 */
.takeaway-dish-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(92, 101, 112, 0.14);
    border-radius: 16px;
    background: #f4f7fb;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.takeaway-dish-item:hover {
    background: #e8ecf3;
    border-color: rgba(92, 101, 112, 0.22);
}

.takeaway-dish-item-left {
    flex: 1;
    min-width: 0;
}

.takeaway-dish-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 外卖点餐：列 flex + 中间列表可滚动，避免底部合计/下单被 overflow 裁切 */
.takeaway-menu-modal-content.wallet-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.takeaway-menu-modal-content.wallet-modal-content > .wallet-modal-header {
    flex-shrink: 0;
}

.takeaway-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.takeaway-menu-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-bottom: max(20px, calc(12px + env(safe-area-inset-bottom, 0px)));
}

.takeaway-detail-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.takeaway-menu-topbar,
.takeaway-direction-toggle {
    flex-shrink: 0;
}

.takeaway-menu-topbar,
.takeaway-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.takeaway-menu-footer {
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(92, 101, 112, 0.12);
}

.takeaway-menu-target {
    font-size: 14px;
    color: #2f3b46;
}

.takeaway-menu-mode {
    margin-top: 4px;
    font-size: 12px;
    color: #5c6570;
}

.takeaway-refresh-btn,
.takeaway-direction-btn,
.takeaway-submit-btn,
.takeaway-receive-btn {
    border: 1px solid rgba(52, 59, 66, 0.18);
    background: #eef2f7;
    color: #2b3138;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13px;
}

.takeaway-direction-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.takeaway-direction-btn.is-active {
    background: #cfd8ea;
    border-color: rgba(52, 59, 66, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.takeaway-menu-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 2px;
    padding-bottom: 4px;
    touch-action: pan-y;
}

.takeaway-menu-list.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.takeaway-menu-list::-webkit-scrollbar {
    display: none;
}

.takeaway-menu-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.takeaway-menu-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #2d3742;
    letter-spacing: 0.02em;
}

.takeaway-menu-group-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.takeaway-dish-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(92, 101, 112, 0.14);
    border-radius: 16px;
    background: #f4f7fb;
    padding: 12px 14px;
    text-align: left;
}

.takeaway-dish-item.is-selected {
    background: #cfd8ea;
    border-color: rgba(50, 56, 63, 0.22);
}

.takeaway-dish-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.takeaway-dish-name {
    font-size: 14px;
    font-weight: 600;
    color: #2e3640;
}

.takeaway-dish-category,
.takeaway-menu-empty,
.takeaway-receive-hint {
    font-size: 12px;
    color: #67707b;
    line-height: 1.45;
}

.takeaway-dish-price,
.takeaway-detail-total {
    font-size: 13px;
    font-weight: 700;
    color: #2f353d;
}

.chat-message-bubble.chat-message-bubble--takeaway {
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.chat-message-bubble.chat-message-bubble--kinship-invite {
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    /* 窄屏：随会话列宽收缩，避免固定 236px 超出气泡后被 #chat-page 规则 overflow:hidden 裁切 */
    width: min(236px, 100%);
    max-width: 100%;
    box-sizing: border-box;
}

/* —— 一起听歌·邀请卡片 —— */
.chat-message-bubble.chat-message-bubble--lt-invite {
    padding: 0 !important;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: min(236px, 100%);
    max-width: 100%;
    box-sizing: border-box;
}
#chat-page .chat-message .chat-message-bubble.chat-message-bubble--lt-invite {
    overflow: visible !important;
}
.chat-lt-invite-card {
    width: 100%;
    max-width: 236px;
    border-radius: 18px;
    padding: 12px 14px 12px;
    background: linear-gradient(180deg, #ffe9f0 0%, #fff5f8 100%);
    border: 1px solid rgba(214, 83, 122, 0.22);
    box-shadow: 0 8px 22px rgba(214, 83, 122, 0.10);
    color: #3a2330;
}
.chat-lt-invite-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.chat-lt-invite-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(214, 83, 122, 0.16);
    color: #b03f6a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.chat-lt-invite-chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.chat-lt-invite-chip--pending {
    background: rgba(255, 255, 255, 0.72);
    color: #846272;
}
.chat-lt-invite-chip--accept {
    background: rgba(78, 168, 122, 0.18);
    color: #2f7c54;
}
.chat-lt-invite-chip--reject {
    background: rgba(155, 116, 130, 0.16);
    color: #7a5564;
}
.chat-lt-invite-title {
    font-size: clamp(13px, 3.9vw, 15px);
    line-height: 1.4;
    font-weight: 700;
    color: #3a2330;
    margin-bottom: 6px;
}
.chat-lt-invite-body {
    font-size: 12px;
    line-height: 1.55;
    color: #5b3b4a;
    word-break: break-word;
}
.chat-lt-invite-sub {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(214, 83, 122, 0.18);
    font-size: 11px;
    line-height: 1.5;
    color: #846272;
}

/* #chat-page 下通用气泡块对「非拍立得/转账…」强制 overflow:hidden，特异性高于上一段，须收回亲属卡可见溢出或配合宽度收缩 */
#chat-page .chat-message .chat-message-bubble.chat-message-bubble--kinship-invite {
    overflow: visible !important;
}

.chat-kinship-invite-card {
    width: 100%;
    max-width: 236px;
    border-radius: 20px;
    padding: 14px;
    background: linear-gradient(180deg, #cfd8e6 0%, #eef2f7 100%);
    border: 1px solid rgba(86, 100, 118, 0.18);
    box-shadow: 0 10px 24px rgba(57, 71, 88, 0.10);
    color: #2f3946;
}

.chat-kinship-invite-card.is-received {
    background: linear-gradient(180deg, #d8e0eb 0%, #f3f6f9 100%);
}

.chat-kinship-invite-card.is-removed {
    background: linear-gradient(180deg, #dde2e8 0%, #f5f7f9 100%);
    color: #66717d;
}

.chat-kinship-invite-top,
.chat-kinship-invite-foot,
.chat-kinship-invite-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-kinship-invite-top,
.chat-kinship-invite-foot {
    flex-wrap: wrap;
    row-gap: 8px;
}

.chat-kinship-invite-top {
    margin-bottom: 12px;
}

.chat-kinship-invite-main {
    align-items: stretch;
}

.chat-kinship-invite-copy {
    min-width: 0;
    flex: 1;
}

.chat-kinship-invite-chip,
.chat-kinship-invite-state {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.06em;
    max-width: 100%;
    box-sizing: border-box;
}

.chat-kinship-invite-chip {
    flex-shrink: 0;
    background: rgba(73, 93, 118, 0.12);
    color: #415268;
    font-weight: 700;
}

.chat-kinship-invite-state {
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.56);
    color: #5c6978;
}

.chat-kinship-invite-title {
    font-size: clamp(13px, 3.9vw, 15px);
    line-height: 1.42;
    font-weight: 700;
    color: #2f3946;
    word-break: break-word;
}

.chat-kinship-invite-subtitle {
    margin-top: 6px;
    font-size: 11px;
    color: #667385;
    letter-spacing: 0.08em;
}

.chat-kinship-invite-amount {
    margin-top: 10px;
    font-size: clamp(17px, 5.2vw, 22px);
    line-height: 1;
    font-weight: 800;
    color: #304458;
}

.chat-kinship-invite-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #5c6773;
}

.chat-kinship-invite-brand {
    width: 56px;
    flex: 0 0 56px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0 2px;
}

.chat-kinship-invite-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(47, 57, 70, 0.08));
}

.chat-kinship-invite-brand-text {
    font-size: 9px;
    line-height: 1.3;
    text-align: center;
    color: #6f7b88;
    letter-spacing: 0.04em;
}

.chat-kinship-invite-foot {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(84, 96, 111, 0.10);
}

.chat-kinship-invite-foot-text {
    font-size: 11px;
    color: #738090;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.chat-kinship-invite-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 140px;
    min-width: 0;
    max-width: 100%;
}

.chat-kinship-invite-accept,
.chat-kinship-invite-reject,
.chat-kinship-invite-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(100%, 72px);
    flex: 1 1 72px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.chat-kinship-invite-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.chat-kinship-invite-accept {
    border: 0;
    background: linear-gradient(180deg, #55697f 0%, #46596d 100%);
    color: #f7f9fb;
    box-shadow: 0 6px 14px rgba(70, 89, 109, 0.18);
}

.chat-kinship-invite-retry {
    border: 0;
    background: linear-gradient(180deg, #55697f 0%, #46596d 100%);
    color: #f7f9fb;
    box-shadow: 0 6px 14px rgba(70, 89, 109, 0.18);
    cursor: pointer;
}

.chat-kinship-invite-reject {
    border: 1px solid rgba(82, 98, 115, 0.35);
    background: rgba(255, 255, 255, 0.72);
    color: #5a6a7a;
    box-shadow: none;
    cursor: pointer;
}

.chat-kinship-invite-reject:active {
    opacity: 0.88;
}

.chat-kinship-invite-wait {
    background: rgba(255, 255, 255, 0.55);
    color: #6a7684;
    font-weight: 600;
    min-width: auto;
    padding: 0 14px;
}

.chat-kinship-invite-badge:not(.chat-kinship-invite-wait) {
    background: rgba(255, 255, 255, 0.68);
    color: #526273;
}

.chat-kinship-invite-badge.is-removed {
    color: #7a8693;
}

.chat-takeaway-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 232px;
    border: 1px solid rgba(74, 80, 88, 0.16);
    border-radius: 20px;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, #d7deec 0%, #f3f5f8 100%);
    color: #343a41;
    box-shadow: 0 8px 18px rgba(52, 58, 65, 0.08);
    text-align: left;
}

.chat-takeaway-card.is-delivered {
    background: linear-gradient(180deg, #dfe5ef 0%, #f5f6f8 100%);
}

.chat-takeaway-card-top,
.chat-takeaway-card-foot,
.takeaway-detail-item,
.takeaway-detail-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-takeaway-brand {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.chat-takeaway-status {
    font-size: 11px;
    color: #4a525a;
}

.chat-takeaway-card-title {
    font-size: 16px;
    font-weight: 700;
}

.chat-takeaway-card-summary {
    font-size: 13px;
    color: #4f5963;
    line-height: 1.45;
}

.chat-takeaway-card-foot {
    font-size: 12px;
    color: #59636d;
}
.takeaway-detail-map {
    position: relative;
    min-height: 184px;
    border-radius: 22px;
    background: linear-gradient(180deg, #d7deec 0%, #f1f3f6 100%);
    overflow: hidden;
}

.takeaway-detail-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.28) 48%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: takeaway-map-sheen 2.8s linear infinite;
}

.takeaway-detail-map.is-delivered::after {
    display: none;
}

.takeaway-route-line {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 96px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #4d555d 0 12px, transparent 12px 18px);
    opacity: 0.55;
}

/* ====== 外卖小哥（猫咪萌系 · 吃了么蓝黄配色） ======
   基础姿态：朝右；通过 scaleX(-1) 镜像得到朝左姿态。
   - data-recipient="user"  → User 是收货方，从左向右行驶
   - data-recipient="char"  → Char 是收货方，从右向左行驶
*/
.takeaway-courier {
    position: absolute;
    top: 38px;
    width: 96px;
    height: 80px;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgba(35, 58, 92, 0.22));
}

.takeaway-detail-map .takeaway-courier,
.takeaway-detail-map[data-recipient="user"] .takeaway-courier {
    left: 18px;
    right: auto;
    animation: takeaway-courier-move-right 5.4s linear infinite;
}

.takeaway-detail-map[data-recipient="char"] .takeaway-courier {
    left: auto;
    right: 18px;
    animation: takeaway-courier-move-left 5.4s linear infinite;
}

.takeaway-detail-map.is-delivered .takeaway-courier {
    animation: none;
    transition: none;
}

.takeaway-detail-map.is-delivered .takeaway-courier,
.takeaway-detail-map.is-delivered[data-recipient="user"] .takeaway-courier {
    left: auto;
    right: 8px;
    transform: scaleX(1);
}

.takeaway-detail-map.is-delivered[data-recipient="char"] .takeaway-courier {
    left: 8px;
    right: auto;
    transform: scaleX(-1);
}

/* === 摩托车主体（蓝色车架 + 座椅 + 车头流线） === */
.takeaway-courier::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 48px;
    width: 80px;
    height: 18px;
    border: 2px solid #1c2a3a;
    border-radius: 22px 12px 4px 8px;
    background:
        linear-gradient(160deg, #3a86ff 0%, #2563d6 50%, #163f95 100%);
    box-shadow:
        inset 7px 3px 0 rgba(255, 255, 255, 0.5),
        inset -3px -3px 0 rgba(8, 26, 64, 0.32),
        14px -7px 0 -2px #2563d6,
        14px -7px 0 0 #1c2a3a;
}

/* === 两个轮子（带辐条） + 大灯轮罩 === */
.takeaway-courier::after {
    content: '';
    position: absolute;
    left: 0;
    top: 60px;
    right: 0;
    height: 20px;
    background:
        radial-gradient(circle at 12px 9px, #6c757d 0 1.5px, #1c1f24 1.5px 4.5px, #0a0c10 4.5px 7.5px, transparent 7.5px 8.5px, #1c1f24 8.5px 9.8px, transparent 9.8px),
        radial-gradient(circle at 74px 9px, #6c757d 0 1.5px, #1c1f24 1.5px 4.5px, #0a0c10 4.5px 7.5px, transparent 7.5px 8.5px, #1c1f24 8.5px 9.8px, transparent 9.8px);
}

/* 前轮处"突突突"前进尾迹（黄色短线） */
.takeaway-courier-puff {
    position: absolute;
    left: -8px;
    top: 54px;
    width: 14px;
    height: 18px;
    pointer-events: none;
    background:
        linear-gradient(40deg, transparent 38%, #ffce3a 38% 66%, transparent 66%) 0 1px / 9px 3px no-repeat,
        linear-gradient(15deg, transparent 38%, #ffce3a 38% 66%, transparent 66%) 0 8px / 11px 3px no-repeat,
        linear-gradient(-8deg, transparent 38%, #ffce3a 38% 66%, transparent 66%) 0 14px / 9px 3px no-repeat;
    opacity: 0.9;
    animation: takeaway-puff-blink 0.55s ease-in-out infinite;
}

.takeaway-detail-map.is-delivered .takeaway-courier-puff {
    display: none;
}

/* === 头部（脸蛋 + 腮红） === */
.takeaway-courier-head {
    position: absolute;
    left: 30px;
    top: 8px;
    width: 22px;
    height: 22px;
    border: 2px solid #1c2a3a;
    border-radius: 48% 52% 46% 50%;
    background: linear-gradient(180deg, #ffe1d2 0%, #ffd0bb 100%);
    transform: rotate(-4deg);
    z-index: 3;
    box-shadow:
        inset 6px -5px 0 rgba(245, 165, 142, 0.34),
        inset -3px 3px 0 rgba(255, 220, 200, 0.6);
}

/* 头盔（黄色 · 流光高光 · 脖带阴影） */
.takeaway-courier-head::before {
    content: '';
    position: absolute;
    left: -7px;
    top: -10px;
    width: 33px;
    height: 17px;
    border: 2px solid #1c2a3a;
    border-bottom: 0;
    border-radius: 18px 20px 5px 5px;
    background: linear-gradient(180deg, #ffd957 0%, #f5b522 100%);
    box-shadow:
        inset 8px 3px 0 rgba(255, 255, 255, 0.6),
        inset -3px -2px 0 rgba(170, 110, 0, 0.28),
        0 9px 0 -7px #d99a18;
}

/* 猫咪耳朵：一对小尖三角（左主体 + 右用 box-shadow 复制） */
.takeaway-courier-head::after {
    content: '';
    position: absolute;
    left: -3px;
    top: -18px;
    width: 9px;
    height: 12px;
    background: #ffd957;
    border: 2px solid #1c2a3a;
    border-bottom: 0;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: rotate(-14deg);
    box-shadow: 22px 3px 0 -1px #ffd957;
}

/* === 身体（黄色雨衣 + 隐含的腿与白鞋） === */
.takeaway-courier-body {
    position: absolute;
    left: 28px;
    top: 26px;
    width: 30px;
    height: 22px;
    border: 2px solid #1c2a3a;
    border-radius: 8px 10px 6px 6px;
    background: linear-gradient(180deg, #ffe085 0%, #ffce3a 100%);
    transform: skewX(-7deg) rotate(3deg);
    z-index: 2;
    box-shadow:
        inset 8px 2px 0 rgba(255, 255, 255, 0.45),
        inset -2px -3px 0 rgba(180, 120, 0, 0.18),
        -5px 19px 0 -3px #ffd6c0,
        0 23px 0 -5px #1c1f24,
        2px 25px 0 -6px #ffffff;
}

/* 弯曲手臂（搭在车头把手上） */
.takeaway-courier-body::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 6px;
    width: 19px;
    height: 9px;
    border: 2px solid #1c2a3a;
    border-radius: 999px;
    background: #ffd6c0;
    transform: rotate(-22deg);
    box-shadow: inset 4px 1px 0 rgba(255, 255, 255, 0.4);
}

/* 后座外卖箱（黑底 + 黄顶 + 中央"吃"圈 logo） */
.takeaway-courier-body::after {
    content: '';
    position: absolute;
    left: 24px;
    top: -2px;
    width: 28px;
    height: 25px;
    border: 2px solid #1c2a3a;
    border-radius: 4px;
    background:
        radial-gradient(circle at 50% 65%, transparent 0 2.5px, #ffce3a 2.5px 4px, transparent 4px 100%),
        linear-gradient(180deg, #ffd957 0 36%, #1c1f24 36% 100%);
    transform: skewX(7deg) rotate(-2deg);
    box-shadow:
        inset 0 9px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 0 rgba(0, 0, 0, 0.5),
        inset -2px 0 0 rgba(0, 0, 0, 0.35);
}

/* === 收货方头像（默认右侧；Char 收货时切到左侧） === */
.takeaway-recipient-avatar {
    position: absolute;
    top: 62px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #4a525c 0%, #2f343b 100%);
    color: #eef2f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 8px rgba(40, 70, 105, 0.2);
    z-index: 4;
}

/* 送达时收货方头像加一圈"门铃"动画提示 */
.takeaway-detail-map.is-delivered .takeaway-recipient-avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 206, 58, 0.7);
    animation: takeaway-recipient-ring 1.4s ease-out infinite;
    pointer-events: none;
}

@keyframes takeaway-recipient-ring {
    0%   { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

.takeaway-detail-map .takeaway-recipient-avatar,
.takeaway-detail-map[data-recipient="user"] .takeaway-recipient-avatar {
    right: 16px;
    left: auto;
}

.takeaway-detail-map[data-recipient="char"] .takeaway-recipient-avatar {
    left: 16px;
    right: auto;
}

.takeaway-map-text {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #3e454d;
}

.takeaway-detail-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.takeaway-receive-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

@keyframes takeaway-courier-move-right {
    0%   { transform: translateX(0) translateY(0) scaleX(1); }
    25%  { transform: translateX(35px) translateY(-1px) scaleX(1); }
    50%  { transform: translateX(70px) translateY(0) scaleX(1); }
    75%  { transform: translateX(105px) translateY(-1px) scaleX(1); }
    100% { transform: translateX(140px) translateY(0) scaleX(1); }
}

@keyframes takeaway-courier-move-left {
    0%   { transform: translateX(0) translateY(0) scaleX(-1); }
    25%  { transform: translateX(-35px) translateY(-1px) scaleX(-1); }
    50%  { transform: translateX(-70px) translateY(0) scaleX(-1); }
    75%  { transform: translateX(-105px) translateY(-1px) scaleX(-1); }
    100% { transform: translateX(-140px) translateY(0) scaleX(-1); }
}

@keyframes takeaway-puff-blink {
    0%, 100% { opacity: 0.9; transform: translateX(0); }
    50%      { opacity: 0.3; transform: translateX(-2px); }
}

@keyframes takeaway-map-sheen {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
