/* CityMaster public shortcodes — aligned with cabinet design system */
:root {
  --cm-dark: #0f172a;
  --cm-blue: #1976d2;
  --cm-yellow: #f2d300;
  --cm-text: #1e293b;
  --cm-muted: #64748b;
  --cm-bg: #f3f4f6;
  --cm-border: #e2e8f0;
  --cm-radius: 10px;
  --cm-radius-sm: 8px;
  --cm-touch: 44px;
  --cm-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cm-blue);
  color: #fff;
  border: 0;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--cm-radius-sm);
  text-decoration: none;
  min-height: var(--cm-touch);
  touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(25, 118, 210, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}
.cm-btn:hover { background: #1565c0; color: #fff; }
.cm-btn:active { transform: translateY(1px); }
.cm-btn-sm { padding: 0.4rem 0.75rem; font-size: 0.9rem; min-height: 36px; }

.cm-form {
  display: grid;
  gap: 0.9rem;
  max-width: 32rem;
  width: 100%;
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  padding: 1.35rem;
  box-shadow: var(--cm-shadow);
}
.cm-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cm-muted);
}
.cm-form input,
.cm-form select,
.cm-form textarea {
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--cm-text);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
  width: 100%;
  max-width: 100%;
  min-height: var(--cm-touch);
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cm-form input:focus,
.cm-form select:focus,
.cm-form textarea:focus {
  outline: none;
  border-color: var(--cm-blue);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}
.cm-form textarea { min-height: 110px; resize: vertical; }
.cm-check {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--cm-text);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
}
.cm-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  padding: 0;
  accent-color: var(--cm-blue);
}

.cm-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 0.85rem;
}
.cm-service-tile {
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--cm-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 88px;
}
.cm-service-tile:hover {
  transform: translateY(-2px);
  border-color: var(--cm-blue);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.cm-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 0.85rem;
}
.cm-market-card {
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius-sm);
  padding: 1rem;
  box-shadow: var(--cm-shadow);
}
.cm-market-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }
.cm-market-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cm-market-cats a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  background: #fff;
  border: 1px solid var(--cm-border);
  text-decoration: none;
  color: inherit;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
}
.cm-market-cats a:hover { border-color: var(--cm-blue); color: var(--cm-blue); }

.cm-price { color: #2e7d32; font-weight: 700; }
.cm-status-result {
  margin-top: 1rem;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  box-shadow: var(--cm-shadow);
  overflow-wrap: anywhere;
}
.cm-status-lane {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  margin-top: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}
.cm-status-lane span {
  padding: 0.35rem 0.55rem;
  background: #e2e8f0;
  font-size: 0.8rem;
  white-space: nowrap;
  flex: 0 0 auto;
  border-radius: 6px;
}
.cm-status-lane span.is-current { background: var(--cm-blue); color: #fff; }
.cm-form-msg { min-height: 1.25rem; color: var(--cm-muted); }
.cm-form-msg.is-error { color: #d32f2f; }
.cm-form-msg.is-ok { color: #2e7d32; }

.cm-contact { display: grid; gap: 1rem; }
.cm-map { overflow: hidden; max-width: 100%; border-radius: var(--cm-radius); }
.cm-map iframe, .cm-map > * { max-width: 100% !important; }

.cm-order-modal {
  border: 0;
  padding: 0;
  max-width: min(420px, calc(100vw - 2rem));
  width: 100%;
  border-radius: var(--cm-radius);
  overflow: hidden;
}
.cm-order-modal::backdrop { background: rgba(15, 23, 42, 0.5); }
.cm-order-form { padding: 1.35rem; display: grid; gap: 0.85rem; }

@media (max-width: 600px) {
  .cm-services-grid,
  .cm-market-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cm-form { max-width: none; }
  .cm-btn { width: 100%; }
}

@media (max-width: 380px) {
  .cm-services-grid,
  .cm-market-grid {
    grid-template-columns: 1fr;
  }
}
