/* ============================================================
   MyCityBiz Digital Business Card — Public Stylesheet
   Mobile-first. Theme variables injected via PHP.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--mcb-bg);
  color: var(--mcb-fg);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--mcb-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul  { list-style: none; }

/* ── Card Wrapper ─────────────────────────────────────────── */
.mcb-card-wrap {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Desktop outer background */
@media (min-width: 600px) {
  body { background-color: #d0d5de; }
  body.theme-dark,
  body.theme-midnight { background-color: #07080f; }
  body.theme-saffron  { background-color: #e0d0c0; }
  body.theme-emerald  { background-color: #c0d8c8; }
  body.theme-royal    { background-color: #c0c8e0; }

  .mcb-card-wrap {
    margin: 2rem auto;
    min-height: unset;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15);
  }
}

/* ── Hero Section ─────────────────────────────────────────── */
.mcb-hero {
  background: linear-gradient(160deg, var(--mcb-accent) 0%, var(--mcb-btn-bg) 60%, var(--mcb-panel) 100%);
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mcb-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}

.mcb-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.mcb-photo-wrap {
  margin-bottom: 0.75rem;
  z-index: 1;
}

.mcb-owner-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  margin: 0 auto;
}

.mcb-logo-wrap {
  margin-bottom: 0.75rem;
  z-index: 1;
}

.mcb-biz-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255,255,255,0.15);
  padding: 6px;
  margin: 0 auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.mcb-hero-text { z-index: 1; }

.mcb-owner-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-bottom: 0.2rem;
}

.mcb-designation {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.mcb-biz-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.3rem;
}

.mcb-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.78);
  font-style: italic;
  max-width: 320px;
  margin: 0 auto;
}

/* ── Card Panel (shared) ─────────────────────────────────── */
.mcb-card-panel {
  background: var(--mcb-panel);
  margin: 0.5rem 0.75rem;
  border-radius: 16px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.mcb-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mcb-accent);
  margin-bottom: 0.85rem;
  opacity: 0.85;
}

/* ── Contact Panel ───────────────────────────────────────── */
.mcb-contact-panel { padding-bottom: 1rem; }

/* ── Button Group ────────────────────────────────────────── */
.mcb-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.mcb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  width: 100%;
  text-align: center;
}

.mcb-btn:active { transform: scale(0.97); opacity: 0.9; }

.mcb-btn-primary {
  background: var(--mcb-btn-bg);
  color: var(--mcb-btn-text);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.mcb-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.24);
  text-decoration: none;
}

.mcb-btn-secondary {
  background: transparent;
  color: var(--mcb-btn-bg);
  border: 2px solid var(--mcb-btn-bg);
}

.mcb-btn-secondary:hover { background: var(--mcb-btn-bg); color: var(--mcb-btn-text); text-decoration: none; }

.mcb-btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37,211,102,0.3);
}

.mcb-btn-whatsapp:hover { background: #1ebe59; text-decoration: none; }

.mcb-wa-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Action Row (icon buttons) ───────────────────────────── */
.mcb-action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.5rem;
}

.mcb-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.7rem 0.4rem;
  border-radius: 12px;
  background: var(--mcb-bg);
  color: var(--mcb-fg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  min-height: 60px;
}

.mcb-action-btn:hover  { background: var(--mcb-accent); color: var(--mcb-btn-text); text-decoration: none; }
.mcb-action-btn:active { transform: scale(0.95); }

.mcb-action-icon  { font-size: 1.3rem; line-height: 1; }
.mcb-action-label { line-height: 1.2; text-align: center; white-space: nowrap; }

/* ── Info Row (email / address) ──────────────────────────── */
.mcb-info-panel { padding: 0.9rem 1.1rem; }

.mcb-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--mcb-fg);
  text-decoration: none;
}

.mcb-info-row:hover { color: var(--mcb-accent); text-decoration: none; }

.mcb-info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.mcb-info-text { font-size: 0.92rem; line-height: 1.5; word-break: break-word; }

/* ── Description ─────────────────────────────────────────── */
.mcb-description {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--mcb-fg);
  opacity: 0.85;
}

.mcb-description.mcb-muted { opacity: 0.55; font-style: italic; }

/* ── Services List ───────────────────────────────────────── */
.mcb-services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mcb-service-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--mcb-bg);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mcb-fg);
}

.mcb-service-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mcb-accent);
  flex-shrink: 0;
}

/* ── Social Links ────────────────────────────────────────── */
.mcb-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mcb-social-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.mcb-social-btn:hover       { opacity: 0.88; text-decoration: none; }
.mcb-social-btn:active      { transform: scale(0.96); }
.mcb-social-icon            { font-size: 0.9rem; font-style: normal; }

.mcb-social-facebook  { background: #1877f2; }
.mcb-social-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.mcb-social-youtube   { background: #ff0000; }
.mcb-social-linkedin  { background: #0a66c2; }
.mcb-social-twitter   { background: #000000; }

/* ── QR Panel ────────────────────────────────────────────── */
.mcb-qr-panel { text-align: center; }

.mcb-qr-wrap {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin: 0.5rem auto;
}

.mcb-qr-img  { width: 160px; height: 160px; display: block; }
.mcb-qr-hint { font-size: 0.75rem; opacity: 0.6; margin-top: 0.4rem; }

/* ── Footer ──────────────────────────────────────────────── */
.mcb-footer {
  background: var(--mcb-footer-bg);
  color: var(--mcb-footer-fg);
  padding: 1.25rem 1.25rem 2rem;
  margin-top: auto;
  text-align: center;
}

.mcb-footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.mcb-footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.75;
  object-fit: contain;
}

.mcb-footer-powered {
  font-size: 0.75rem;
  color: var(--mcb-footer-fg);
  opacity: 0.75;
}

.mcb-footer-powered a { color: var(--mcb-accent); }

.mcb-footer-cta-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mcb-accent);
  background: var(--mcb-panel);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--mcb-accent);
  transition: background 0.15s, color 0.15s;
}

.mcb-footer-cta-link:hover {
  background: var(--mcb-accent);
  color: var(--mcb-btn-text);
  text-decoration: none;
}

/* ── Status Pages ────────────────────────────────────────── */
.mcb-status-page {
  text-align: center;
  padding: 3rem 1.5rem;
  margin: 2rem 0.75rem;
}

.mcb-status-icon  { font-size: 3rem; margin-bottom: 1rem; }
.mcb-status-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--mcb-fg); }
.mcb-status-msg   { font-size: 0.95rem; color: var(--mcb-fg); opacity: 0.7; line-height: 1.6; }

/* ── Pending Banner ──────────────────────────────────────── */
.mcb-pending-banner {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── Toast notification ──────────────────────────────────── */
.mcb-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(20,20,30,0.92);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 500;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
  z-index: 999;
  max-width: 90vw;
}

.mcb-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Generator Page: honeypot hide ───────────────────────── */
.mcb-hp-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ── Generator Form Styles ───────────────────────────────── */
.mcb-gen-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

@media (min-width: 600px) {
  .mcb-gen-wrap { padding: 2.5rem 1.5rem 4rem; }
}

.mcb-gen-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(135deg, #0055b3, #0077cc);
  border-radius: 20px;
  color: #fff;
}

.mcb-gen-logo {
  height: 40px;
  width: auto;
  margin: 0 auto 0.75rem;
}

.mcb-gen-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.mcb-gen-subtitle {
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Form card sections */
.mcb-form-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mcb-form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0055b3;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid #e8eef8;
}

/* Form fields */
.mcb-field { margin-bottom: 1rem; }
.mcb-field:last-child { margin-bottom: 0; }

.mcb-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.mcb-label .mcb-required { color: #ef4444; margin-left: 2px; }
.mcb-label .mcb-optional  { color: #9ca3af; font-weight: 400; font-size: 0.75rem; margin-left: 4px; }

.mcb-input,
.mcb-textarea,
.mcb-select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1.5px solid #e0e7ef;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
}

.mcb-input:focus,
.mcb-textarea:focus,
.mcb-select:focus {
  border-color: #0055b3;
  box-shadow: 0 0 0 3px rgba(0,85,179,0.12);
  background: #f4f6ff;        /* ← was #fff */
  color: #1a1d2e; 
}

.mcb-input.error,
.mcb-textarea.error,
.mcb-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.mcb-textarea { min-height: 90px; resize: vertical; }

.mcb-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.mcb-field-error {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mcb-field-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.3rem;
}

/* Slug row */
.mcb-slug-row { position: relative; }

.mcb-slug-prefix {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #6b7280;
  pointer-events: none;
  white-space: nowrap;
  font-weight: 500;
}

.mcb-slug-input { padding-left: 12rem; }

.mcb-slug-status {
  font-size: 0.78rem;
  margin-top: 0.3rem;
  height: 1.1rem;
  transition: color 0.2s;
}

.mcb-slug-status.available { color: #16a34a; }
.mcb-slug-status.taken     { color: #ef4444; }
.mcb-slug-status.checking  { color: #6b7280; }

/* Upload previews */
.mcb-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}

.mcb-upload-area:hover { border-color: #0055b3; background: #f0f5ff; }

.mcb-upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.mcb-upload-icon     { font-size: 1.8rem; margin-bottom: 0.3rem; }
.mcb-upload-text     { font-size: 0.82rem; color: #6b7280; }
.mcb-upload-preview  {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.5rem auto 0;
  display: none;
  border: 2px solid #e0e7ef;
}

/* Upload row for logo + photo side by side */
.mcb-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Theme selector */
.mcb-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mcb-theme-option { display: none; }

.mcb-theme-label {
  display: block;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 0.4rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.1s;
  user-select: none;
}

.mcb-theme-option:checked + .mcb-theme-label {
  border-color: #0055b3;
  box-shadow: 0 0 0 3px rgba(0,85,179,0.15);
  transform: scale(1.03);
}

.mcb-theme-swatch {
  height: 36px;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

/* Submit button */
.mcb-submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #0055b3;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(0,85,179,0.3);
  margin-top: 0.5rem;
}

.mcb-submit-btn:hover  { background: #0044a0; box-shadow: 0 6px 20px rgba(0,85,179,0.4); }
.mcb-submit-btn:active { transform: scale(0.98); }
.mcb-submit-btn:disabled { background: #9ca3af; cursor: not-allowed; box-shadow: none; }

/* Generator error box */
.mcb-form-error-box {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: #991b1b;
}

.mcb-form-error-box ul { margin-top: 0.5rem; padding-left: 1.2rem; list-style: disc; }
.mcb-form-error-box li { margin-bottom: 0.25rem; }

/* Success state */
.mcb-success-box {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.mcb-success-icon  { font-size: 3rem; margin-bottom: 0.75rem; }
.mcb-success-title { font-size: 1.3rem; font-weight: 700; color: #15803d; margin-bottom: 0.5rem; }
.mcb-success-msg   { font-size: 0.9rem; color: #166534; margin-bottom: 1.25rem; }

.mcb-url-copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #fff;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.mcb-url-copy-text {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0055b3;
  word-break: break-all;
  text-align: left;
}

.mcb-copy-btn {
  flex-shrink: 0;
  background: #0055b3;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.mcb-copy-btn:hover { background: #0044a0; }

.mcb-success-qr {
  margin: 0 auto 0.75rem;
  width: 130px;
  height: 130px;
  display: block;
}

/* General alert */
.mcb-alert {
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.mcb-alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.mcb-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.mcb-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.mcb-alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* Utility */
.mcb-text-center { text-align: center; }
.mcb-mt-1 { margin-top: 0.5rem; }
.mcb-mt-2 { margin-top: 1rem; }
.mcb-mt-3 { margin-top: 1.5rem; }

/* Dark mode adjustments for generator page */
@media (prefers-color-scheme: dark) {
  .mcb-form-card  { background: #1e2130; }
  .mcb-input,
  .mcb-textarea,
  .mcb-select     { background: #f4f6ff; border-color: #374151; color: #1a1d2e; }
  .mcb-label      { color: #c5cae4; }
}
