/* static/css/market-drafts.css
   The Piactér page (.mk). Builds on home-drafts.css. */

/* Fit / not fit */

.mk-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mk-fit__card {
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 24px;
}

.mk-fit__card h3 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.1;
}

.mk-fit__card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mk-fit__card li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 16.5px;
  line-height: 1.5;
}

.mk-fit__card .hd-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  stroke-width: 2.4;
}

.mk-fit__small {
  margin-top: 14px !important;
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .mk-fit {
    grid-template-columns: minmax(0, 1fr);
  }
}

.mb .mk-fit__card { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.mb .mk-fit__card li { color: var(--text); }
.mb .mk-fit__card .hd-icon { color: var(--amber); }
.mb .mk-fit__card--no .hd-icon { color: #ff9a8c; }
.mb .mk-fit__small { color: var(--muted); }

.mk .mb-apps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1000px) {
  .mk .mb-apps {
    grid-template-columns: minmax(0, 1fr);
  }

  .mk .mb-app,
  .mk .mb-app + .mb-app {
    padding: 28px 0 8px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .mk .mb-app:first-child {
    border-top: 0;
  }
}

.mk .mb-app .hd-icon {
  display: block;
}

/* Seller dashboard illustration in the dark hero */

.mk-status {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Status colours follow the app's own families (orders.css): submitted amber,
   approved green, re-toned for the dark hero. */
.mk-status--sub { background: rgba(255, 181, 71, 0.16); color: #ffc97a; }
.mk-status--ok,
.mk-status--part { background: rgba(80, 200, 140, 0.16); color: #8ee0b5; }

/* Marks a feature that only the Pro plan has. */
.mk-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe08a, #ffb547 55%, #e8930c);
  box-shadow: 0 0 12px rgba(255, 181, 71, 0.35);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
  color: #3a2300;
}

.mk-stage {
  position: relative;
}

.mk-window {
  display: block;
}

.mk-role {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(255, 165, 61, 0.45);
  border-radius: 999px;
  background: rgba(255, 165, 61, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.mk-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.mk-bar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.mk-bar__brand .piacter-mark img {
  width: auto;
  height: 22px;
}

.mk-bar__links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.mk-bar__user {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.mk-buyer__body {
  position: relative;
  padding: 18px 22px 22px;
}

/* After sending, the buyer's window turns into the thank-you screen. */
.mk-role {
  position: relative;
  z-index: 2;
}

.mk-thanks {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: #0e1830;
  text-align: center;
  opacity: 0;
  animation: mk-thanks 12s ease-in-out infinite;
}

.mk-thanks__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(80, 200, 140, 0.16);
  color: #8ee0b5;
}

.mk-thanks__icon .hd-icon {
  width: 32px;
  height: 32px;
}

.mk-thanks strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
}

.mk-thanks p {
  margin: 0 !important;
  font-size: 13.5px;
  color: var(--muted) !important;
}

.mk-thanks b {
  color: var(--text);
}

.mk-thanks__links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.mk-thanks__links span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.mk-cart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 16px;
}

.mk-cart__head strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}

.mk-cart__head small {
  display: block;
  margin: 2px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.mk-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(80, 200, 140, 0.12);
  font-size: 12px;
  color: #8ee0b5;
}

.mk-guarantee .hd-icon {
  width: 14px;
  height: 14px;
}

.mk-submit {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--amber);
  font-size: 13.5px;
  font-weight: 700;
  color: #1a1000;
  white-space: nowrap;
  animation: mk-press 12s ease-in-out infinite;
}

.mk-submit {
  display: grid;
}

.mk-submit > * {
  display: flex;
  grid-area: 1 / 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mk-submit .hd-icon {
  width: 15px;
  height: 15px;
}

.mk-submit > :first-child {
  animation: mk-show-then-hide-early 12s steps(1) infinite;
}

.mk-submit > :last-child {
  opacity: 0;
  animation: mk-hide-then-show-early 12s steps(1) infinite;
}

.mk-cart {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.mk-cart__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.mk-cart__top strong,
.mk-cart__top b {
  color: var(--text);
}

.mk-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.mk-items th,
.mk-items td {
  padding: 7px 14px;
  text-align: left;
  white-space: nowrap;
}

.mk-items th {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mk-items td {
  border-top: 1px solid var(--line);
  color: #e6eaf2;
}

.mk-items__muted {
  color: var(--muted) !important;
}

.mk-items__total {
  font-weight: 700;
}

.mk-stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  vertical-align: middle;
}

.mk-stepper i,
.mk-stepper b {
  min-width: 20px;
  padding: 1px 4px;
  font-style: normal;
  text-align: center;
}

.mk-stepper i {
  color: var(--muted);
}

.mk-stepper b {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.mk-delivery {
  margin: 14px 0 0 !important;
  font-size: 13px;
  color: var(--muted) !important;
}

.mk-delivery b {
  color: var(--text);
}

/* Phone: the seller's mobile order cards and bottom navigation. */

.mk-phone {
  position: relative;
  width: 238px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  background: #070c18;
  box-shadow: 0 34px 90px -24px rgba(0, 0, 0, 0.85), 0 0 60px -20px rgba(255, 165, 61, 0.25);
}

.mk-role--seller {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}

.mk-phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 452px;
  overflow: hidden;
  border-radius: 29px;
  background: linear-gradient(180deg, #14213f, #0a1224);
}

.mk-phone__screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 72px;
  height: 18px;
  border-radius: 10px;
  background: #03060d;
  transform: translateX(-50%);
}

.mk-notice {
  position: absolute;
  top: 32px;
  right: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(30, 42, 70, 0.97);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(-140%);
  animation: mk-notice 12s ease-in-out infinite;
}

.mk-notice .piacter-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
}

.mk-notice .piacter-mark img {
  width: auto;
  height: 20px;
}

.mk-notice p {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted) !important;
}

.mk-notice strong {
  display: block;
  font-size: 11.5px;
  color: var(--text);
}

.mk-notice small {
  align-self: flex-start;
  font-size: 9.5px;
  color: var(--muted);
}

@keyframes mk-notice {
  0%, 32% { opacity: 0; transform: translateY(-140%); }
  35%, 54% { opacity: 1; transform: translateY(0); }
  58%, 100% { opacity: 0; transform: translateY(-140%); }
}

.mk-phone__title {
  margin: 0 !important;
  padding: 40px 16px 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text) !important;
}

.mk-phone__title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.mk-phone__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px;
  overflow: hidden;
}

.mk-order {
  flex-shrink: 0;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 10.5px;
  color: var(--muted);
}

.mk-order__top,
.mk-order__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mk-order__top > :first-child {
  white-space: nowrap;
}

.mk-order__top b {
  color: var(--text);
}

.mk-order .mk-status {
  padding: 2px 6px;
  font-size: 9.5px;
  white-space: nowrap;
}

.mk-order__buyer {
  margin: 6px 0 !important;
  font-size: 13px;
  font-weight: 700;
  color: #e6eaf2 !important;
}

.mk-order__open {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
}

.mk-order__pill,
.mk-phone__badge {
  display: grid;
}

.mk-order__pill > *,
.mk-phone__badge > * {
  grid-area: 1 / 1;
  justify-self: end;
}

.mk-phone__badge > * {
  justify-self: center;
}

.mk-order__pill > :last-child,
.mk-phone__badge > :first-child {
  opacity: 0;
}

.mk-badge {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--amber);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  color: #1a1000;
}

.mk-phone__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 4px 14px;
  border-top: 1px solid var(--line);
  background: rgba(6, 11, 24, 0.92);
}

.mk-phone__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  color: var(--muted);
}

.mk-phone__tab .hd-icon {
  width: 19px;
  height: 19px;
}

.mk-phone__tab--active {
  color: var(--amber);
}

.mk-phone__badge {
  position: absolute;
  top: -5px;
  left: 50%;
  margin-left: 3px;
}

/* The loop (12 s): the buyer presses "Rendelés beküldése" (7%), the button
   turns to "Rendelés beküldve", then the thank-you screen (17%). Only then
   does the order travel to the seller (25-32%): the notice drops in, the order
   lands and the badge counts it (35%); the seller approves it at 72%. */

.mk-order--new {
  animation: mk-arrive 12s ease-in-out infinite;
}

.mk-order--new .mk-order__pill > :first-child {
  animation: mk-show-then-hide 12s ease-in-out infinite;
}

.mk-order--new .mk-order__pill > :last-child {
  animation: mk-hide-then-show 12s ease-in-out infinite;
}

.mk-phone__badge {
  animation: mk-badge-pop 12s ease-in-out infinite;
}

.mk-phone__badge > :first-child {
  animation: mk-count-old 12s steps(1) infinite;
}

.mk-phone__badge > :last-child {
  animation: mk-count-new 12s steps(1) infinite;
}

@keyframes mk-press {
  0%, 5% { transform: scale(1); box-shadow: none; background: var(--amber); color: #1a1000; }
  7% { transform: scale(0.93); box-shadow: 0 0 0 6px rgba(255, 165, 61, 0.25); background: var(--amber); color: #1a1000; }
  8%, 97% { transform: scale(1); box-shadow: none; background: #1f9d72; color: #fff; }
  100% { background: var(--amber); color: #1a1000; }
}

@keyframes mk-show-then-hide-early {
  0% { opacity: 1; }
  8% { opacity: 0; }
  97% { opacity: 1; }
}

@keyframes mk-hide-then-show-early {
  0% { opacity: 0; }
  8% { opacity: 1; }
  97% { opacity: 0; }
}

@keyframes mk-thanks {
  0%, 14% { opacity: 0; }
  17%, 90% { opacity: 1; }
  95%, 100% { opacity: 0; }
}

@keyframes mk-arrive {
  0%, 33% { max-height: 0; margin-bottom: -8px; padding-top: 0; padding-bottom: 0; opacity: 0; border-color: transparent; }
  39% { max-height: 110px; margin-bottom: 0; padding-top: 10px; padding-bottom: 10px; opacity: 1; border-color: rgba(255, 165, 61, 0.7); box-shadow: 0 0 0 3px rgba(255, 165, 61, 0.16); }
  56%, 92% { max-height: 110px; margin-bottom: 0; padding-top: 10px; padding-bottom: 10px; opacity: 1; border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
  97% { max-height: 110px; margin-bottom: 0; padding-top: 10px; padding-bottom: 10px; opacity: 0; }
  100% { max-height: 0; margin-bottom: -8px; padding-top: 0; padding-bottom: 0; opacity: 0; border-color: transparent; }
}

@keyframes mk-show-then-hide {
  0%, 70% { opacity: 1; }
  74%, 100% { opacity: 0; }
}

@keyframes mk-hide-then-show {
  0%, 70% { opacity: 0; }
  74%, 100% { opacity: 1; }
}

@keyframes mk-badge-pop {
  0%, 36% { transform: scale(1); }
  39% { transform: scale(1.35); }
  44%, 100% { transform: scale(1); }
}

@keyframes mk-count-old {
  0% { opacity: 1; }
  38% { opacity: 0; }
  98% { opacity: 1; }
}

@keyframes mk-count-new {
  0% { opacity: 0; }
  38% { opacity: 1; }
  98% { opacity: 0; }
}

/* Two devices side by side: the buyer's window, a gap with the order
   travelling across it, and the seller's phone. */
.mk-flow,
.mk-timeline {
  display: none;
}

@media (min-width: 900px) {
  .mk-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 238px;
    gap: 84px;
    align-items: start;
  }

  .mk-phone {
    margin-top: calc(clamp(56px, 7vw, 88px) + 44px);
  }

  .mk-flow {
    position: absolute;
    top: calc(clamp(56px, 7vw, 88px) + 146px);
    right: 250px;
    display: block;
    width: 60px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 165, 61, 0.55) 0 6px, transparent 6px 12px);
  }

  .mk-flow::after {
    content: "";
    position: absolute;
    top: -4px;
    right: -2px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid rgba(255, 165, 61, 0.8);
  }

  /* A thin bar above both devices showing where the loop is. */
  .mk-timeline {
    position: absolute;
    top: calc(clamp(56px, 7vw, 88px) - 26px);
    right: 0;
    left: 0;
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
  }

  .mk-timeline span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(255, 165, 61, 0.5), var(--amber));
    transform: scaleX(0);
    transform-origin: left;
    animation: mk-timeline 12s linear infinite;
  }

  .mk-flow__dot {
    position: absolute;
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 12px 3px rgba(255, 165, 61, 0.6);
    opacity: 0;
    animation: mk-travel 12s ease-in-out infinite;
  }
}

@keyframes mk-timeline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes mk-travel {
  0%, 24% { left: 0; opacity: 0; }
  25% { left: 0; opacity: 1; }
  32% { left: calc(100% - 10px); opacity: 1; }
  34%, 100% { left: calc(100% - 10px); opacity: 0; }
}

@media (max-width: 1099px) {
  .mk-items th:nth-child(3),
  .mk-items td:nth-child(3),
  .mk-bar__links {
    display: none;
  }
}

@media (max-width: 899px) {
  .mk-phone {
    display: none;
  }
}

/* On a phone only the seller's phone is shown, without the role labels. */
@media (max-width: 760px) {
  .mk-stage .mb-window {
    display: none;
  }

  .mk-stage {
    display: flex;
    justify-content: center;
    margin-top: 56px;
    padding-bottom: 48px;
  }

  .mk-phone {
    position: relative;
    top: auto;
    right: auto;
    display: block;
  }

  .mk-role {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-notice,
  .mk-timeline {
    display: none;
  }

  .mk-flow__dot,
  .mk-submit,
  .mk-submit > *,
  .mk-order--new,
  .mk-order--new .mk-order__pill > *,
  .mk-phone__badge,
  .mk-phone__badge > * {
    animation: none;
  }

  .mk-thanks {
    display: none;
    animation: none;
  }
}
