/* ==========================================================================
   Commissions
   The service cards and info panel in the store, the request form, the chat
   shared by buyer and seller, and the list in the account page. Colours come
   from the theme tokens, so light mode follows.
   ========================================================================== */

.cm-page [hidden] {
    display: none !important;
}

.cm-optional {
    margin-left: 4px;
    color: var(--theme-text-tertiary);
    font-weight: 400;
}

/* ------------------------------------------------------- store cards -- */

.cm-cover {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(120% 90% at 20% 10%, rgba(53, 182, 255, 0.35), transparent 60%),
        radial-gradient(90% 80% at 90% 90%, rgba(21, 103, 245, 0.35), transparent 60%),
        #0b1224;
}

.cm-cover--card {
    aspect-ratio: 16 / 10;
}

.cm-cover--banner {
    height: 168px;
}

/* Blurred and dimmed, so the logos in front stay the subject. The slight
   oversize hides the soft edge the blur leaves around the image. */
.cm-cover__bg {
    position: absolute;
    inset: -8%;
    z-index: -2;
    width: 116%;
    height: 116%;
    /* The site caps images at their box; this one is meant to overflow it. */
    max-width: none;
    max-height: none;
    object-fit: cover;
    filter: blur(3px) brightness(0.72) saturate(1.15);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.cm-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 13, 28, 0.1) 0%, rgba(8, 13, 28, 0.15) 55%, rgba(8, 13, 28, 0.7) 100%),
        radial-gradient(70% 60% at 50% 45%, rgba(21, 103, 245, 0.18), transparent 70%);
}

.cm-service:hover .cm-cover__bg {
    filter: blur(2px) brightness(0.82) saturate(1.2);
    transform: scale(1.05);
}

.cm-cover__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 16px;
}

.cm-cover__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 0.04s);
}

.cm-service:hover .cm-cover__badge {
    transform: translateY(-4px);
}

.cm-cover__tile {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(10, 16, 34, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cm-cover__tile img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.cm-cover__tile i {
    font-size: 2rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.cm-cover__badge--large .cm-cover__tile {
    width: 96px;
    height: 96px;
    border-radius: 26px;
}

.cm-cover__badge--large .cm-cover__tile i {
    font-size: 3.2rem;
}

.cm-cover__name {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.cm-cover--banner .cm-cover__tile {
    width: 56px;
    height: 56px;
    border-radius: 16px;
}

.cm-cover--banner .cm-cover__tile img {
    width: 34px;
    height: 34px;
}

.cm-cover--banner .cm-cover__badge--large .cm-cover__tile {
    width: 80px;
    height: 80px;
}

/* As the top of a card, edge to edge. */
.cm-cover--inset {
    margin: -20px -22px 18px;
    border-radius: 18px 18px 0 0;
}

.cm-cover--compact {
    height: 120px;
}

.cm-cover--compact .cm-cover__name {
    display: none;
}

.cm-credits {
    margin: 22px 0 0;
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    line-height: 1.5;
}

body.blueva-theme .cm-credits a {
    color: inherit;
    text-decoration: underline;
}

body.blueva-theme .cm-service__open {
    padding: 0;
    border: 0;
    background: none;
    color: var(--theme-text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Like the product cards, the title stretches over the whole card. */
.cm-service__open::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}

.cm-service__open:focus-visible {
    outline: none;
}

.cm-service:has(.cm-service__open:focus-visible) {
    border-color: rgba(53, 182, 255, 0.8);
}

.cm-from {
    color: var(--theme-text-tertiary);
    font-size: 0.8rem;
}

/* ----------------------------------------------------------- dialog -- */

.cm-dialog {
    /* The site's reset clears the margin a modal dialog centres itself with. */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--theme-glass-border);
    border-radius: 24px;
    background: var(--theme-bg-elevated, #0f172a);
    color: var(--theme-text-primary);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.cm-dialog::backdrop {
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cm-dialog[open] {
    animation: cm-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cm-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.cm-dialog__inner {
    padding: 24px 28px 28px;
}

body.blueva-theme .cm-dialog__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(10, 16, 34, 0.6);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cm-dialog__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cm-dialog__head h2 {
    margin: 0 0 2px;
    color: var(--theme-text-primary);
    font-size: 1.35rem;
    font-weight: 800;
}

.cm-dialog__head p {
    margin: 0;
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}

.cm-dialog__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 12px 30px -10px rgba(21, 103, 245, 0.7);
}

.cm-dialog__lead {
    margin: 18px 0;
    color: var(--theme-text-secondary);
    line-height: 1.6;
}

.cm-dialog__fine {
    margin: 10px 0 0;
    color: var(--theme-text-tertiary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.cm-dialog__subtitle {
    margin: 22px 0 10px;
    color: var(--theme-text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.cm-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.cm-estimate {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(53, 182, 255, 0.35);
    border-radius: 16px;
    background: rgba(53, 182, 255, 0.25);
}

.cm-estimate > div {
    padding: 14px 16px;
    background: var(--theme-bg-elevated, #0f172a);
    background-image: linear-gradient(rgba(53, 182, 255, 0.08), rgba(53, 182, 255, 0.08));
}

.cm-estimate strong {
    display: block;
    color: var(--theme-text-primary);
    font-size: 1.15rem;
}

.cm-estimate__label {
    display: block;
    margin-bottom: 2px;
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cm-estimate--stacked {
    grid-template-columns: 1fr;
    margin-top: 18px;
}

.cm-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}

.cm-checklist li {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 6px;
}

.cm-checklist i {
    margin-top: 0.3em;
    color: var(--theme-accent-primary);
}

.cm-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: cm-step;
}

.cm-steps li {
    position: relative;
    padding-left: 40px;
    counter-increment: cm-step;
}

.cm-steps li::before {
    content: counter(cm-step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(53, 182, 255, 0.45);
    border-radius: 50%;
    color: var(--theme-accent-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.cm-steps strong {
    display: block;
    color: var(--theme-text-primary);
    font-size: 0.92rem;
}

.cm-steps span {
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
}

/* ------------------------------------------------------ request form -- */

.cm-page {
    padding-bottom: 64px;
}

.cm-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.cm-request__aside {
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
}

.cm-request__actions {
    justify-content: flex-end;
}

.cm-select,
.cm-tool select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 11px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.95rem;
}

.cm-file {
    width: 100%;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
}

.cm-file::file-selector-button {
    margin-right: 10px;
    padding: 7px 12px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--theme-text-primary);
    font: inherit;
    cursor: pointer;
}

.cm-page .acc-flash {
    margin-bottom: 16px;
}

/* ------------------------------------------------------------- chat -- */

.cm-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.cm-chat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: calc(100dvh - var(--navbar-height) - 60px);
    min-height: 520px;
    overflow: hidden;
    border: 1px solid var(--theme-glass-border);
    border-radius: 22px;
    background: var(--theme-glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cm-chat__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--theme-glass-border);
}

body.blueva-theme .cm-chat__back {
    color: var(--theme-text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
}

body.blueva-theme .cm-chat__back:hover {
    color: var(--theme-text-primary);
}

.cm-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.cm-status--info { color: #60a5fa; }
.cm-status--warning { color: #fbbf24; }
.cm-status--active { color: #35b6ff; }
.cm-status--success { color: #34d399; }
.cm-status--muted { color: var(--theme-text-tertiary); }

.cm-thread {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    padding: 20px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cm-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    align-self: center;
    max-width: 80%;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    color: var(--theme-text-secondary);
    font-size: 0.82rem;
    text-align: center;
}

.cm-event time,
.cm-msg__meta time {
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
}

.cm-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 82%;
}

.cm-msg--mine {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.cm-msg--card {
    max-width: min(560px, 92%);
}

.cm-msg__avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.cm-msg__main {
    min-width: 0;
}

.cm-msg__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--theme-text-secondary);
    font-size: 0.8rem;
}

.cm-msg--mine .cm-msg__meta {
    justify-content: flex-end;
}

.cm-msg__meta strong {
    color: var(--theme-text-primary);
}

.cm-badge {
    padding: 1px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.cm-bubble {
    padding: 10px 14px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 4px 16px 16px 16px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--theme-text-primary);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.cm-msg--mine .cm-bubble:not(.cm-card) {
    border-color: transparent;
    border-radius: 16px 4px 16px 16px;
    background: linear-gradient(135deg, #2a9df4, #1567f5);
    color: #fff;
}

body.blueva-theme .cm-msg--mine .cm-bubble:not(.cm-card) a {
    color: #fff;
    text-decoration: underline;
}

.cm-card {
    min-width: min(360px, 100%);
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--theme-glass-bg);
}

.cm-card.is-pending {
    border-color: rgba(53, 182, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(53, 182, 255, 0.1);
}

.cm-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cm-card__head i {
    color: var(--theme-accent-primary);
}

.cm-card__status {
    margin-left: auto;
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
}

.cm-card__status--pending { color: #fbbf24; }
.cm-card__status--accepted { color: #34d399; }
.cm-card__status--declined { color: #f87171; }

.cm-card__note {
    margin-top: 10px;
    color: var(--theme-text-secondary);
}

.cm-card__reply {
    margin-top: 10px;
    padding: 8px 12px;
    border-left: 3px solid rgba(248, 113, 113, 0.6);
    border-radius: 6px;
    background: rgba(248, 113, 113, 0.08);
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}

.cm-card__reply span {
    display: block;
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cm-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
}

.cm-card__waiting {
    margin: 12px 0 0;
    color: var(--theme-text-tertiary);
    font-size: 0.82rem;
}

.cm-answers {
    display: grid;
    gap: 10px;
    margin: 0;
}

.cm-answers dt {
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
}

.cm-answers dd {
    margin: 2px 0 0;
    color: var(--theme-text-primary);
    font-size: 0.92rem;
}

.cm-offer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cm-offer > div {
    flex: 1 1 120px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(53, 182, 255, 0.08);
}

.cm-offer span {
    display: block;
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cm-offer strong {
    color: var(--theme-text-primary);
    font-size: 1.2rem;
}

.cm-offer > .cm-offer__payment {
    flex-basis: 100%;
}

.cm-offer__payment strong {
    font-size: 1rem;
}

.cm-offer__payment p {
    margin: 6px 0 0;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.cm-files {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

body.blueva-theme .cm-files a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-size: 0.85rem;
    text-decoration: none;
}

.cm-files span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-files em {
    margin-left: auto;
    opacity: 0.7;
    font-size: 0.75rem;
    font-style: normal;
}

.cm-decline summary {
    list-style: none;
    cursor: pointer;
}

.cm-decline summary::-webkit-details-marker {
    display: none;
}

.cm-decline[open] {
    flex-basis: 100%;
}

.cm-decline__form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.cm-decline__form textarea,
.cm-composer textarea,
.cm-tool textarea,
.cm-tool input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 11px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
}

.cm-decline__form textarea:focus,
.cm-composer textarea:focus,
.cm-tool textarea:focus,
.cm-tool input:focus {
    border-color: var(--theme-accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 182, 255, 0.18);
}

.cm-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px;
    border-top: 1px solid var(--theme-glass-border);
    background: rgba(251, 191, 36, 0.08);
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
}

.cm-closed {
    margin: 0;
    padding: 16px;
    border-top: 1px solid var(--theme-glass-border);
    color: var(--theme-text-tertiary);
    font-size: 0.88rem;
    text-align: center;
}

/* -------------------------------------------------------- side panel -- */

.cm-side {
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
    display: grid;
    gap: 14px;
}

.cm-side .acc-card {
    margin: 0;
}

.cm-summary .cm-dialog__head h2 {
    font-size: 1.1rem;
}

.cm-facts {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
}

.cm-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
}

.cm-facts dt {
    color: var(--theme-text-tertiary);
}

.cm-facts dd {
    margin: 0;
    color: var(--theme-text-primary);
    font-weight: 600;
    text-align: right;
}

.cm-countdown {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid rgba(53, 182, 255, 0.4);
    border-radius: 14px;
    background: rgba(53, 182, 255, 0.08);
    text-align: center;
}

.cm-countdown strong {
    display: block;
    color: var(--theme-text-primary);
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.cm-countdown__label {
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
}

.cm-countdown.is-late {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.08);
}

.cm-countdown.is-late strong {
    color: #f87171;
}

.cm-countdown--done {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.08);
}

.cm-next strong,
.cm-tools__title {
    display: block;
    margin-bottom: 6px;
    color: var(--theme-text-primary);
}

.cm-next p {
    margin: 0 0 12px;
    color: var(--theme-text-secondary);
    font-size: 0.88rem;
}

.cm-tools {
    display: grid;
    gap: 8px;
}

.cm-tools__title i {
    margin-right: 6px;
    color: var(--theme-accent-primary);
}

.cm-tool {
    border: 1px solid var(--theme-glass-border);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.04);
}

.cm-tool summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    color: var(--theme-text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.cm-tool summary::-webkit-details-marker {
    display: none;
}

.cm-tool summary::after {
    content: "\f078";
    margin-left: auto;
    color: var(--theme-text-tertiary);
    font-family: "Font Awesome 6 Free", "Font Awesome 7 Free";
    font-size: 0.7rem;
    font-weight: 900;
    transition: transform 0.2s ease;
}

.cm-tool[open] summary::after {
    transform: rotate(180deg);
}

.cm-tool summary i {
    width: 18px;
    color: var(--theme-accent-primary);
    text-align: center;
}

.cm-tool__form {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
}

.cm-tool__form--flat {
    padding: 0;
}

.cm-tool__form label {
    display: grid;
    gap: 5px;
    color: var(--theme-text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.cm-tool__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cm-tool__hint {
    margin: 0;
    color: var(--theme-text-tertiary);
    font-size: 0.8rem;
    line-height: 1.45;
}

/* ----------------------------------------------------- account list -- */

.acc-cm-group {
    margin: 18px 0 10px;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.acc-cm-list {
    display: grid;
    gap: 10px;
}

body.blueva-theme .acc-cm-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 16px;
    background: var(--theme-glass-bg);
    color: var(--theme-text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

body.blueva-theme .acc-cm-row:hover {
    border-color: rgba(53, 182, 255, 0.45);
    transform: translateY(-2px);
}

.acc-cm-row.is-unread {
    border-color: rgba(53, 182, 255, 0.55);
}

.acc-cm-row__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
}

.acc-cm-row__text {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.acc-cm-row__text strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.98rem;
}

.acc-cm-row__text em {
    color: var(--theme-text-tertiary);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 500;
}

.acc-cm-row__text > span {
    overflow: hidden;
    color: var(--theme-text-secondary);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-cm-row__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-accent-primary);
    box-shadow: 0 0 0 4px rgba(53, 182, 255, 0.2);
}

.acc-cm-row__price {
    color: var(--theme-text-primary);
    font-weight: 700;
}

/* ------------------------------------------------------------ narrow -- */

@media (max-width: 960px) {
    .cm-shell,
    .cm-request {
        grid-template-columns: 1fr;
    }

    .cm-side,
    .cm-request__aside {
        position: static;
    }

    .cm-chat {
        height: 75dvh;
        min-height: 440px;
    }
}

@media (max-width: 600px) {
    .cm-dialog__inner {
        padding: 22px 18px;
    }

    .cm-checklist,
    .cm-estimate {
        grid-template-columns: 1fr;
    }

    .cm-msg {
        max-width: 94%;
    }

    .cm-composer__hint {
        display: none;
    }

    .cm-composer__row button {
        margin-left: auto;
    }

    body.blueva-theme .acc-cm-row {
        flex-wrap: wrap;
    }

    .acc-cm-row__text {
        flex-basis: calc(100% - 56px);
    }
}

/* The banner already shows the service, so the title under it drops its icon. */
.cm-dialog .cm-dialog__icon,
.cm-cover--inset ~ .cm-dialog__head .cm-dialog__icon {
    display: none;
}

/* ------------------------------------------------- form: dropdowns -- */

/* Without the script, the native select at least matches the inputs. */
.acc .acc-field select.cm-select {
    width: 100%;
    min-height: 46px;
    padding: 11px 40px 11px 13px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 11px;
    background: var(--theme-bg-tertiary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.95rem;
    -webkit-appearance: none;
    appearance: none;
}

/* With it, the native field stays for the form but out of sight. */
.cm-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.cm-dd {
    position: relative;
}

/* The open field rises above the ones after it, which would paint over its panel. */
.acc-field:has(.cm-dd.is-open) {
    position: relative;
    z-index: 50;
}

body.blueva-theme .cm-dd__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 9px 13px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 11px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.blueva-theme .cm-dd__button:hover {
    border-color: var(--theme-border-medium, rgba(148, 163, 184, 0.35));
}

body.blueva-theme .cm-dd__button:focus-visible,
.cm-dd.is-open .cm-dd__button {
    border-color: var(--theme-accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 182, 255, 0.18);
}

body.blueva-theme .cm-dd__button.is-invalid {
    border-color: #f87171;
}

.cm-dd__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-dd__value.is-placeholder {
    color: var(--theme-text-tertiary);
}

.cm-dd__chevron {
    flex: none;
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.cm-dd.is-open .cm-dd__chevron {
    transform: rotate(180deg);
}

.cm-dd__list,
.cm-vp__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    border: 1px solid var(--theme-glass-border);
    border-radius: 14px;
    /* The theme's elevated colour is slightly see-through; over the page's
       solid base it is not, in light and dark alike. */
    background: linear-gradient(var(--theme-bg-elevated), var(--theme-bg-elevated)), var(--theme-bg-primary, #000);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: cm-drop-in 0.16s ease both;
}

@keyframes cm-drop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.cm-dd__list {
    right: 0;
    max-height: 280px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    outline: none;
}

.cm-dd__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--theme-text-secondary);
    font-size: 0.92rem;
    line-height: 1.35;
    cursor: pointer;
}

.cm-dd__option.is-active {
    background: rgba(53, 182, 255, 0.12);
    color: var(--theme-text-primary);
}

.cm-dd__option[aria-selected="true"] {
    color: var(--theme-text-primary);
    font-weight: 600;
}

.cm-dd__option[aria-selected="true"]::after {
    content: "\f00c";
    color: var(--theme-accent-primary);
    font-family: "Font Awesome 6 Free";
    font-size: 0.8rem;
    font-weight: 900;
}

.cm-dd__error {
    margin-top: 6px;
}

/* ------------------------------------------ form: versions picker -- */

.cm-vp__summary {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.cm-vp__tag,
.cm-vp__more {
    padding: 3px 9px;
    border: 1px solid rgba(53, 182, 255, 0.35);
    border-radius: 999px;
    background: rgba(53, 182, 255, 0.12);
    color: var(--theme-text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.cm-vp__more {
    border-color: var(--theme-glass-border);
    background: transparent;
    color: var(--theme-text-secondary);
}

.cm-vp__panel {
    width: max(100%, 440px);
    max-width: calc(100vw - 32px);
    padding: 12px;
}

.cm-vp__search {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 10px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.9rem;
}

.cm-vp__search:focus {
    border-color: var(--theme-accent-primary);
    outline: none;
}

.cm-vp__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

body.blueva-theme .cm-vp__preset,
body.blueva-theme .cm-vp__all,
body.blueva-theme .cm-vp__clear {
    padding: 5px 10px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 999px;
    background: transparent;
    color: var(--theme-text-secondary);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

body.blueva-theme .cm-vp__preset:hover,
body.blueva-theme .cm-vp__all:hover,
body.blueva-theme .cm-vp__clear:hover {
    border-color: rgba(53, 182, 255, 0.5);
    color: var(--theme-text-primary);
}

.cm-vp__groups {
    max-height: 300px;
    margin-top: 10px;
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cm-vp__group + .cm-vp__group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--theme-glass-border);
}

.cm-vp__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.cm-vp__head strong {
    color: var(--theme-text-primary);
    font-size: 0.85rem;
}

.cm-vp__count {
    color: var(--theme-accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
}

body.blueva-theme .cm-vp__all {
    margin-left: auto;
    padding: 2px 9px;
    font-size: 0.72rem;
}

.cm-vp__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.blueva-theme .cm-vp__chip {
    min-width: 58px;
    padding: 6px 10px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 9px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.blueva-theme .cm-vp__chip:hover {
    border-color: rgba(53, 182, 255, 0.5);
    color: var(--theme-text-primary);
}

body.blueva-theme .cm-vp__chip[aria-pressed="true"] {
    border-color: transparent;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
    font-weight: 600;
}

.cm-vp__empty {
    margin: 12px 0;
    color: var(--theme-text-tertiary);
    font-size: 0.85rem;
    text-align: center;
}

.cm-vp__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--theme-glass-border);
}

.cm-vp__status {
    margin-right: auto;
    color: var(--theme-text-tertiary);
    font-size: 0.8rem;
}

.acc .cm-vp__done {
    min-height: 0;
    padding: 7px 16px;
}

/* ----------------------------------------------- form: drop zone -- */

.cm-drop {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 1.5px dashed var(--theme-border-subtle);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.04);
    color: var(--theme-text-secondary);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Outranks the account page's plain label rule, which would make it a block. */
.acc-field label.cm-drop {
    display: grid;
    margin: 0;
    color: var(--theme-text-secondary);
    font-size: 0.92rem;
    font-weight: 400;
}

.cm-drop:hover,
.cm-drop.is-dragging,
.cm-drop:focus-within {
    border-color: rgba(53, 182, 255, 0.6);
    background: rgba(53, 182, 255, 0.06);
}

.cm-drop > i {
    margin-bottom: 4px;
    color: var(--theme-accent-primary);
    font-size: 1.5rem;
}

.cm-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cm-drop__text {
    font-size: 0.92rem;
}

.cm-drop__text strong {
    color: var(--theme-text-primary);
}

.cm-drop__text u {
    color: var(--theme-accent-primary);
}

.cm-drop__hint {
    color: var(--theme-text-tertiary);
    font-size: 0.78rem;
}

.cm-drop__list {
    display: grid;
    gap: 6px;
    width: 100%;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.cm-drop__list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 10px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font-size: 0.85rem;
}

.cm-drop__list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-drop__list em {
    margin-left: auto;
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
    font-style: normal;
}

@media (max-width: 600px) {
    .cm-vp__panel {
        width: 100%;
    }
}

/* ------------------------------------------------------ live chat -- */

.cm-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 8px 8px 16px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.07);
}

.cm-roles__label {
    margin-right: auto;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
}

.cm-roles__label i {
    margin-right: 6px;
    color: #fbbf24;
}

body.blueva-theme .cm-roles__option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 10px;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.blueva-theme .cm-roles__option:hover {
    color: var(--theme-text-primary);
}

body.blueva-theme .cm-roles__option.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
}

.cm-chat__bar {
    gap: 12px;
}

.cm-chat__bar [data-cm-status] {
    margin-left: auto;
}

.cm-thread-wrap {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.cm-thread {
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.cm-thread::-webkit-scrollbar {
    width: 8px;
}

.cm-thread::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.28);
}

/* New messages rise in; your own slide in from your side. */
.cm-msg.is-new,
.cm-event.is-new {
    animation: cm-msg-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cm-msg--mine.is-new {
    animation-name: cm-msg-in-mine;
}

@keyframes cm-msg-in {
    from { opacity: 0; transform: translate(-10px, 10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes cm-msg-in-mine {
    from { opacity: 0; transform: translate(10px, 10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* Follow-ups from the same side within a few minutes join the block above. */
.cm-msg.is-continued {
    margin-top: -10px;
}

.cm-msg.is-continued .cm-msg__meta {
    display: none;
}

.cm-msg.is-continued .cm-msg__avatar {
    visibility: hidden;
    height: 0;
}

.cm-msg.is-continued .cm-bubble {
    border-top-left-radius: 16px;
}

.cm-msg--mine.is-continued .cm-bubble {
    border-top-right-radius: 16px;
}

.cm-msg.is-pending {
    padding-right: 44px;
}

.cm-msg.is-pending .cm-bubble {
    opacity: 0.6;
}

.cm-msg.is-failed .cm-bubble {
    border: 1px solid rgba(248, 113, 113, 0.6);
    background: rgba(248, 113, 113, 0.15);
    opacity: 1;
}

.cm-msg__state {
    display: block;
    margin-top: 4px;
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
    text-align: right;
}

.cm-msg.is-failed .cm-msg__state {
    color: #f87171;
}

.cm-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px 10px;
    color: var(--theme-text-tertiary);
    font-size: 0.8rem;
    animation: cm-drop-in 0.2s ease both;
}

.cm-typing__dots {
    display: inline-flex;
    gap: 3px;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
}

.cm-typing__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-text-secondary);
    animation: cm-dot 1.2s ease-in-out infinite;
}

.cm-typing__dots i:nth-child(2) { animation-delay: 0.15s; }
.cm-typing__dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes cm-dot {
    0%, 60%, 100% { opacity: 0.35; transform: none; }
    30% { opacity: 1; transform: translateY(-3px); }
}

body.blueva-theme .cm-jump {
    position: absolute;
    bottom: 14px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 12px 30px -8px rgba(21, 103, 245, 0.7);
    cursor: pointer;
    transform: translateX(-50%);
    animation: cm-drop-in 0.2s ease both;
}

/* The composer: attach, write and send in one pill. */
.cm-composer {
    padding: 12px 14px 10px;
    border-top: 1px solid var(--theme-glass-border);
}

.cm-composer__box {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 18px;
    background: var(--theme-bg-tertiary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cm-composer__box:focus-within {
    border-color: var(--theme-accent-primary);
    box-shadow: 0 0 0 3px rgba(53, 182, 255, 0.15);
}

.cm-composer textarea {
    flex: 1;
    min-height: 40px;
    max-height: 200px;
    padding: 9px 6px;
    border: 0;
    background: transparent;
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    resize: none;
}

.cm-composer textarea:focus {
    border: 0;
    outline: none;
    box-shadow: none;
}

.cm-attach {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--theme-text-secondary);
    font-size: 1rem;
    cursor: pointer;
}

/* The real input covers the button, invisible, so a click opens the picker. */
.cm-attach input {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.cm-attach:hover {
    background: rgba(148, 163, 184, 0.12);
}

body.blueva-theme .cm-send {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #35b6ff, #1567f5);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

body.blueva-theme .cm-send:hover {
    box-shadow: 0 8px 20px -6px rgba(21, 103, 245, 0.8);
}

body.blueva-theme .cm-send:active {
    transform: scale(0.92);
}

.cm-composer__hint {
    display: block;
    margin-top: 6px;
    padding-left: 8px;
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
}

.cm-composer__files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.cm-filechip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 5px 6px 5px 10px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 999px;
    background: rgba(53, 182, 255, 0.08);
    color: var(--theme-text-primary);
    font-size: 0.8rem;
    animation: cm-drop-in 0.2s ease both;
}

.cm-filechip span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-filechip em {
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
    font-style: normal;
}

body.blueva-theme .cm-filechip button {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    color: var(--theme-text-secondary);
    font-size: 0.65rem;
    cursor: pointer;
}

/* A side panel that changed glows for a moment. */
.cm-side.is-refreshed .acc-card {
    animation: cm-refresh 0.9s ease both;
}

@keyframes cm-refresh {
    0% { box-shadow: 0 0 0 0 rgba(53, 182, 255, 0); }
    30% { box-shadow: 0 0 0 3px rgba(53, 182, 255, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(53, 182, 255, 0); }
}

.acc .acc-btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.acc .acc-btn.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cm-spin 0.7s linear infinite;
}

@keyframes cm-spin {
    to { transform: rotate(360deg); }
}

.cm-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: grid;
    gap: 8px;
    max-width: min(380px, calc(100vw - 40px));
}

.cm-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 14px;
    background: linear-gradient(var(--theme-bg-elevated), var(--theme-bg-elevated)), var(--theme-bg-primary, #000);
    color: var(--theme-text-primary);
    font-size: 0.88rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    animation: cm-toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cm-toast i {
    color: #34d399;
}

.cm-toast--error {
    border-color: rgba(248, 113, 113, 0.5);
}

.cm-toast--error i {
    color: #f87171;
}

.cm-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

@keyframes cm-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cm-msg.is-new,
    .cm-event.is-new,
    .cm-chat__live span,
    .cm-typing__dots i,
    .cm-side.is-refreshed .acc-card {
        animation: none;
    }
}

@media (max-width: 600px) {
    .cm-composer__hint {
        display: none;
    }

    .cm-roles__label {
        flex-basis: 100%;
    }
}

/* --------------------------------------------- pictures and video -- */

.cm-media {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.cm-bubble > .cm-media:first-child {
    margin-top: 0;
}

.cm-media--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cm-media__item {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.cm-media__image {
    display: block;
    cursor: zoom-in;
}

.cm-media__image img,
.cm-media__preview {
    display: block;
    width: 100%;
    max-width: 360px;
    max-height: 320px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.cm-media__image img {
    height: auto;
}

.cm-media--grid .cm-media__image img,
.cm-media--grid .cm-media__preview {
    height: 160px;
    max-width: none;
}

.cm-media__image:hover img {
    transform: scale(1.03);
    filter: brightness(1.08);
}

.cm-media__video {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 340px;
    background: #000;
}

.cm-media__item figcaption {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
}

.cm-media__item figcaption span {
    min-width: 0;
    overflow: hidden;
    opacity: 0.85;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.blueva-theme .cm-media__item figcaption a {
    flex: none;
    margin-left: auto;
    color: inherit;
    opacity: 0.8;
    text-decoration: none;
}

body.blueva-theme .cm-media__item figcaption a:hover {
    opacity: 1;
}

/* The preview while it uploads pulses gently. */
.cm-msg.is-pending .cm-media__preview {
    animation: cm-uploading 1.2s ease-in-out infinite alternate;
}

@keyframes cm-uploading {
    from { opacity: 0.55; }
    to { opacity: 0.85; }
}

.cm-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 56px 24px 24px;
    border: 0;
    background: rgba(2, 6, 23, 0.92);
    color: #fff;
}

.cm-lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    animation: cm-pop 0.25s ease both;
}

.cm-lightbox::backdrop {
    background: transparent;
}

.cm-lightbox img {
    max-width: 100%;
    max-height: calc(100dvh - 140px);
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.cm-lightbox__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    font-size: 0.88rem;
}

.cm-lightbox__name {
    min-width: 0;
    overflow: hidden;
    opacity: 0.8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.blueva-theme .cm-lightbox__download {
    flex: none;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
}

body.blueva-theme .cm-lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

/* The drop zone, smaller, for the delivery form. */
.cm-tool__label {
    color: var(--theme-text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.cm-tool__form label.cm-drop {
    display: grid;
    gap: 2px;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.cm-drop--compact {
    padding: 14px 12px;
}

.cm-drop--compact > i {
    margin-bottom: 0;
    font-size: 1.2rem;
}

/* --------------------------------------------------------- reviews -- */

.cm-closing {
    border-top: 1px solid var(--theme-glass-border);
}

.cm-closing .cm-closed {
    border-top: 0;
}

.cm-review-form,
.cm-review-received {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 20px 20px;
    text-align: center;
    animation: cm-drop-in 0.3s ease both;
}

.cm-review-form__eyebrow {
    color: var(--theme-accent-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cm-review-form.is-done .cm-review-form__eyebrow {
    color: #34d399;
}

.cm-review-form h3 {
    margin: 0;
    color: var(--theme-text-primary);
    font-size: 1.25rem;
    font-weight: 800;
}

.cm-review-form p,
.cm-review-received p {
    margin: 0;
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}

.cm-review-received p {
    max-width: 520px;
    font-style: italic;
}

/* Five stars; the inputs run 5 to 1 and are shown reversed, so hovering a
   star lights it and every star before it with plain sibling selectors. */
.cm-stars-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
}

.cm-stars-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cm-stars-input label {
    color: rgba(148, 163, 184, 0.35);
    font-size: 2.1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cm-stars-input label:hover,
.cm-stars-input label:hover ~ label,
.cm-stars-input input:checked ~ label {
    color: #fbbf24;
}

.cm-stars-input label:hover {
    transform: scale(1.18);
}

.cm-stars-input input:checked + label {
    animation: cm-star-pop 0.35s ease both;
}

.cm-stars-input input:focus-visible + label {
    outline: 2px solid var(--theme-accent-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

@keyframes cm-star-pop {
    40% { transform: scale(1.3); }
    100% { transform: none; }
}

.cm-stars-label {
    min-height: 1.2em;
    color: var(--theme-text-tertiary);
    font-size: 0.82rem;
    font-weight: 600;
}

.cm-review-form textarea {
    width: min(520px, 100%);
    padding: 10px 12px;
    border: 1px solid var(--theme-border-subtle);
    border-radius: 12px;
    background: var(--theme-bg-tertiary);
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
}

.cm-review-form textarea:focus {
    border-color: var(--theme-accent-primary);
    outline: none;
}

.cm-stars {
    display: inline-flex;
    gap: 3px;
    color: rgba(148, 163, 184, 0.35);
}

.cm-stars .is-on {
    color: #fbbf24;
}

.cm-review-received .cm-stars {
    font-size: 1.4rem;
}

.cm-stars--small {
    font-size: 0.72rem;
}

.cm-card__auto {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 0;
    color: var(--theme-text-tertiary);
    font-size: 0.78rem;
}

/* In the store. */
.cm-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--theme-text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.cm-card-rating i {
    color: #fbbf24;
}

.cm-card-rating em {
    color: var(--theme-text-tertiary);
    font-style: normal;
    font-weight: 500;
}

.cm-rating-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 14px;
    color: var(--theme-text-primary);
}

.cm-rating-line__count {
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
}

body.blueva-theme .cm-reviews-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 6px 12px;
    border: 1px solid var(--theme-glass-border);
    border-radius: 999px;
    background: transparent;
    color: var(--theme-text-primary);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.cm-reviews-toggle i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.cm-reviews-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.cm-reviews {
    display: grid;
    gap: 10px;
    max-height: 340px;
    margin-top: 10px;
    padding-right: 4px;
    overflow-y: auto;
    animation: cm-drop-in 0.2s ease both;
}

.cm-review {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.06);
}

.cm-review__avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.cm-review__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cm-review__head strong {
    color: var(--theme-text-primary);
    font-size: 0.88rem;
}

.cm-review__head time {
    color: var(--theme-text-tertiary);
    font-size: 0.75rem;
}

.cm-review p {
    margin: 4px 0 0;
    color: var(--theme-text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cm-review-form__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.acc .cm-review-form__remove {
    color: var(--theme-text-secondary);
}

.acc .cm-review-form__remove:hover {
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}

/* -------------------------------------------------- day dividers -- */

.cm-day {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 -2px;
    color: var(--theme-text-tertiary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cm-day::before,
.cm-day::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--theme-glass-border);
}

.cm-day span {
    flex: none;
}

/* A wordmark logo, wider than it is tall. */
.cm-cover__badge--wide .cm-cover__tile {
    width: auto;
    height: 76px;
    padding: 0 22px;
    border-radius: 22px;
}

.cm-cover__badge--wide .cm-cover__tile img {
    width: auto;
    height: 46px;
}

.cm-cover--banner .cm-cover__badge--wide .cm-cover__tile {
    width: auto;
    height: 64px;
}

.cm-cover--banner .cm-cover__badge--wide .cm-cover__tile img {
    width: auto;
    height: 38px;
}

.cm-cover--compact .cm-cover__badge--wide .cm-cover__tile {
    height: 54px;
}

.cm-cover--compact .cm-cover__badge--wide .cm-cover__tile img {
    height: 32px;
}
