/* cloud.css: Caligrafy Cloud's own additions to Caligrafy's look (layout.css, look.css stay the framework's) */

/* a screenshot of an app: the top of the page, in the proportions of a laptop screen */
.cq-shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--cq-radius-control, 4px); background: var(--cq-color-canvas, #fff); margin-bottom: 12px; }

/* the marketplace of an app: the offer, the request, the listing and its sales */
.cq-market-pitch { padding: 32px; border-radius: var(--cq-radius-card); background: var(--cq-color-surface); }
.cq-market-pitch h3 { margin: 4px 0 12px; font-size: 26px; line-height: 1.25; }
.cq-market-pitch .cq-lead { margin-left: 0; margin-right: 0; }
.cq-market-pitch--quiet { background: transparent; border: 1px solid var(--cq-color-border, #e2e2e2); }
.cq-market-kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--cq-color-text-muted); }
.cq-market-kicker .cq-badge { text-transform: none; letter-spacing: normal; }
.cq-market-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; counter-reset: step; }
.cq-market-steps li { counter-increment: step; padding: 16px; border-radius: var(--cq-radius-card); background: var(--cq-color-canvas); }
.cq-market-steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%; background: var(--cq-color-ink); color: var(--cq-color-canvas); font-size: 14px; }
.cq-market-steps strong, .cq-market-steps span { display: block; }
.cq-market-steps span { font-size: 14px; color: var(--cq-color-text-muted); }
#market-listing .cq-stats { margin: 16px 0 32px; }
.cq-market-listing { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.cq-market-gallery .cq-shot { margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08); }
.cq-market-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.cq-market-thumbs button { width: 72px; padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; opacity: .65; }
.cq-market-thumbs button.active, .cq-market-thumbs button:hover { border-color: var(--cq-color-ink); opacity: 1; }
.cq-market-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 2px; }
.cq-market-meta h3 { margin: 0 0 4px; font-size: 24px; }
.cq-market-price { margin: 0 0 16px; font-weight: 500; }
.cq-market-meta #listing-description { white-space: pre-line; }
@media (max-width: 767px) {
  .cq-market-steps, .cq-market-listing { grid-template-columns: minmax(0, 1fr); }
  .cq-market-pitch { padding: 24px; }
}

#marketplace .cq-auth-note { text-align: left; margin: 16px 0; }
.cq-badge--attention { background: #fff1c2; color: #6b4e00; }
.cq-market-command { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; padding: 12px 12px 12px 16px;
  border-radius: var(--cq-radius-control); background: var(--cq-color-ink); color: var(--cq-color-canvas); }
.cq-market-command code { color: inherit; font-size: 15px; background: none; overflow-wrap: anywhere; }
#market-listing > .cq-lead { margin: 8px 0 0; }
#listing-noshots { padding: 32px; border: 1px dashed var(--cq-color-border, #d6d6d6); border-radius: var(--cq-radius-card); text-align: center; }
#market-listing .cq-market-listing { margin-top: 24px; }
.cq-market-wait { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--cq-radius-control);
  background: var(--cq-color-surface); font-size: 14px; }
.cq-market-wait p { margin: 0; }
.cq-market-spinner { flex: none; width: 16px; height: 16px; margin-top: 2px; border: 2px solid var(--cq-color-border, #d6d6d6);
  border-top-color: var(--cq-color-ink); border-radius: 50%; animation: cq-spin 1s linear infinite; }
@keyframes cq-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cq-market-spinner { animation: none; } }
.cq-market-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.cq-market-choice { display: grid; gap: 4px; padding: 16px; text-align: left; border: 1px solid var(--cq-color-border, #d6d6d6);
  border-radius: var(--cq-radius-card); background: var(--cq-color-canvas); color: var(--cq-color-text); cursor: pointer; transition: var(--cq-transition); }
.cq-market-choice:hover, .cq-market-choice:focus-visible { border-color: var(--cq-color-ink); }
.cq-market-choice strong { color: var(--cq-color-ink); font-weight: 600; }
.cq-market-choice span { font-size: 14px; color: var(--cq-color-text-muted); }
@media (max-width: 767px) { .cq-market-choices { grid-template-columns: minmax(0, 1fr); } }
.cq-market-payee { margin: 0 0 16px; padding: 16px; border-radius: var(--cq-radius-card); background: var(--cq-color-canvas); }
.cq-market-payee h4 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.cq-market-payee .cq-field { margin-bottom: 12px; }
.cq-market-payee-current { margin: 0; font-size: 14px; }
.cq-market-payee-note { margin: 0 0 12px; font-size: 14px; color: var(--cq-color-text-muted); }
.cq-link-button { padding: 0; border: 0; background: none; color: var(--cq-color-ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
#offer:disabled { opacity: .5; cursor: not-allowed; }
.cq-badge--danger { background: #fde2e1; color: #8a1c14; }
.cq-market-reason { margin: 8px 0 16px; padding: 14px 16px; border-left: 3px solid #c0392b; border-radius: 0 var(--cq-radius-control) var(--cq-radius-control) 0;
  background: var(--cq-color-surface); white-space: pre-line; }
