/* 全部页 · 交换购物车 */
.ex-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.ex-toolbar .ex-mode-btn,
.ex-fab,
.ex-panel button,
.ex-modal button,
.ex-success button {
    font: inherit;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid var(--color-border-medium);
    background: var(--color-link-mark);
    color: var(--color-text);
    padding: 0.4rem 0.85rem;
    font-weight: 600;
}

.ex-toolbar .ex-mode-btn.is-on {
    background: var(--color-accent-blue);
    color: var(--color-bar-text);
    border-color: transparent;
}

.ex-toolbar .ex-mode-btn:disabled,
.ex-panel button:disabled,
.ex-modal button:disabled,
.ex-success button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.ex-mode .comic-card {
    position: relative;
}

body.ex-mode .comic-card .ex-add-btn {
    display: block;
}

.comic-card .ex-add-btn {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: var(--color-link-mark);
    cursor: pointer;
    color: var(--color-text);
}

.comic-card.in-cart {
    outline: 2px solid var(--color-accent-solid);
}

.comic-card.in-cart .ex-add-btn {
    background: var(--color-surface-dim);
}

.ex-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: none;
}

body.ex-mode .ex-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ex-fab .ex-count {
    background: var(--color-accent-solid);
    color: #fff;
    border-radius: 999px;
    min-width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.ex-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 50;
}

.ex-backdrop.open {
    display: block;
}

.ex-panel,
.ex-modal {
    display: none;
    position: fixed;
    z-index: 60;
    background: var(--color-blog-body-bg, #fff);
    border-radius: 14px;
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    max-height: min(88vh, 720px);
    overflow: auto;
    padding: 1rem 1.1rem 1.15rem;
}

.ex-panel.open,
.ex-modal.open {
    display: block;
}

.ex-panel {
    right: 1rem;
    bottom: 4.5rem;
    width: min(24rem, calc(100vw - 2rem));
}

.ex-modal {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(28rem, calc(100vw - 2rem));
}

.ex-panel h2,
.ex-modal h2 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.ex-panel .muted,
.ex-modal .muted,
.ex-success .muted {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.ex-item {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.65rem 0.7rem;
    margin-bottom: 0.55rem;
}

.ex-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.ex-item .ex-item-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.ex-item .ex-item-actions button {
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
    background: var(--color-surface);
}

.ex-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ex-field span.hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.ex-field input,
.ex-field textarea {
    font: inherit;
    font-weight: 400;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
}

.ex-field textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.ex-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ex-actions .secondary {
    background: var(--color-surface);
}

.ex-success .ex-actions .secondary,
.ex-success-bar .secondary {
    background: var(--color-surface);
}

.ex-hp {
    position: absolute;
    left: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.ex-status {
    min-height: 1.3em;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.ex-status.err {
    color: #a33;
}

.ex-status.ok {
    color: #2a7a3a;
}

.ex-success {
    display: none;
    margin: 0 0 1rem;
    padding: 0;
    border-radius: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.ex-success.open {
    display: block;
}

.ex-success-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-link-mark);
}

.ex-success-bar-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.ex-success-bar-text strong {
    font-size: 1.05rem;
}

.ex-success-body {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid var(--color-border);
}

.ex-success.collapsed .ex-success-body {
    display: none;
}

.ex-success.collapsed .ex-success-bar {
    background: var(--color-surface);
}

.ex-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.ex-meta .ex-meta-row span.label {
    color: var(--color-text-muted);
    margin-right: 0.35rem;
}

.ex-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ex-sum-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.7rem;
    background: #fff;
}

.ex-sum-card img {
    width: 5.25rem;
    flex-shrink: 0;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background: var(--color-surface-dim);
}

.ex-sum-card-body {
    flex: 1;
    min-width: 0;
}

.ex-sum-card-body h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    line-height: 1.3;
}

.ex-sum-card-offer,
.ex-sum-card-promo {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.ex-sum-card-offer .label,
.ex-sum-card-promo .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.15rem;
}

.ex-sum-card-promo {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
    color: var(--color-text-secondary);
}

.ex-panel#exCheckout {
    width: min(28rem, calc(100vw - 2rem));
}

.ex-panel .ex-card-list {
    max-height: 40vh;
    overflow: auto;
}

.tag-filter.ex-filter-row {
    justify-content: flex-start;
}

@media (max-width: 480px) {
    .ex-sum-card img {
        width: 4.25rem;
    }
}
