/* ===============================================================
   Denver Jacks — Missed Connections
   main.css (consolidated)
   Source: merged from style.css + mask.css; conflicts resolved for dark card theme.
   Date: 2025-10-15
   =============================================================== */

/* ---------- Root + Base ---------- */
:root { --navy:#062343; --sun:#FF8800; --sun2:#FFD166; }

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
/* NOTE: Page background is set inline on some pages (e.g., index.php).
   We keep body unset here to avoid conflicts. */

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }

/* ---------- Hero header (shared across pages) ---------- */
.hero { text-align: center; padding: 20px 0 8px 0; position: relative; z-index: 3; color:#fff; }
.hero .site-logo,
img.site-logo {
  display:block; margin:0 auto 10px auto;
  height:auto !important; width: clamp(280px, 80vw, 560px) !important; /* doubled scale */
  max-width:100% !important;
}
.hero .tagline { max-width: 720px; margin: 0 auto 10px auto; font-size: 1.06rem; line-height: 1.45; }
.hero .actions { display:flex; justify-content:center; margin-top:8px; }
.hero a { color: var(--sun2); } .hero a:hover { color: #ffe099; }

/* ---------- Buttons ---------- */
.btn { display:inline-block; padding:10px 14px; text-decoration:none; border:1px solid #cfd7e6; border-radius:10px; color:#111; background:#fff; cursor:pointer; font-weight:600; }
.btn:hover { background:#f3f4f6; }
.btn.primary { background:var(--sun); border-color:var(--sun); color:#111; font-weight:700; }
a.btn.reply, a.btn.ok[href*="relay.php"] { background:#22c55e !important; border-color:#16a34a !important; color:#fff !important; font-weight:700; }
a.btn.reply:hover, a.btn.ok[href*="relay.php"]:hover { background:#16a34a !important; border-color:#15803d !important; color:#fff !important; }

/* Send/Cancel variants (used on relay/post pages) */
.buttons { text-align:left; margin-top:16px; }
.buttons .btn + .btn { margin-left:8px; }
.btn-send { background:#FF8800; color:#fff; border:1px solid #FF8800; padding:10px 18px; border-radius:10px; font-weight:600; }
.btn-cancel { background:#C0392B; color:#fff; border:1px solid #C0392B; padding:10px 18px; border-radius:10px; font-weight:600; margin-left:8px; }
.form .buttons { text-align:left; margin-top:16px; padding-left:0; }
.form .buttons .btn + .btn { margin-left:8px; }

/* ---------- Cards (dark theme for Missed Connections) ---------- */
.card { background:#0b2c5a; color:#fff; border:1px solid rgba(255,255,255,0.15); border-radius:12px; padding:16px; margin:12px 0; }
.card.success { border-color:#2ecc71; }
.card.error { border-color:#ff6b6b; }

/* Post card colored tabs */
.card.card-post { position: relative; overflow: hidden; }
.card.card-post::before { content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:#9ca3af; }
.card.card-post.tab-bar-night::before   { background:#7c3aed; }
.card.card-post.tab-go-go-night::before { background:#06b6d4; }
.card.card-post.tab-theme-night::before { background:#f59e0b; }
.card.card-post.tab-other::before       { background:#9ca3af; }

/* ---------- Meta & badges ---------- */
.meta { display:block; color:#e8e8e8; font-size:1rem; line-height:1.4; margin-bottom:8px; }
/* Neutralize badge/tag/chip styles to plain text across site */
.tag, .badge, .chip {
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: inline !important;
  text-transform: none !important;
  box-shadow: none !important;
  font-weight: inherit !important;
}
/* Meta row tidy */
.meta, .meta-row, .post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

/* ---------- Forms ---------- */
label { font-size: 1.0rem; font-weight:600; display:inline-block; margin-bottom:6px; }
.input, textarea, input[type="text"], input[type="email"], input[type="date"], input[type="search"], select {
  font-size:1.05rem !important; line-height:1.35 !important; padding:14px 14px !important; border-radius:12px !important; border:1px solid #cfd7e6; width:100%;
}
textarea { min-height: 9rem; resize: vertical; }
.row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:640px){ .row { grid-template-columns:1fr; gap:12px; } }

/* ---------- Search block ---------- */
.search-block { margin: 10px 0 16px 0; position: relative; z-index: 2; }
.search-block form { display:flex; gap:8px; flex-wrap:wrap; }
.search-block input[type="text"] {
  flex: 1 1 320px; padding: 14px 14px; border: 1px solid #d1d5db; border-radius: 12px; font-size: 1.05rem;
  background:#fff; color:#111;
}
.search-block button { padding: 12px 16px; border-radius: 12px; border: 1px solid #d1d5db; background: #fff; cursor:pointer; font-weight:700; font-size:1.05rem; }
.search-block button.primary { background:#2563eb; color:#fff; border-color:#1d4ed8; }
.search-info { font-size:.9rem; opacity:.8; margin-top:4px; }

/* ---------- Stacking rhythm ---------- */
.container .card + .card { margin-top: 12px; }
.promo-slot-top, .promo-slot-after { position: relative; z-index: 2; }
.container .card { position: relative; z-index: 1; }

/* ---------- Ad Card: Soft Gradient Strip (current) ---------- */
.ad-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(255,136,0,0.08), rgba(255,209,102,0.08));
  border: 1px solid rgba(255,136,0,0.18);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Larger image (desktop/tablet) */
.ad-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

.ad-text { flex: 1; }

.ad-title {
  font-weight: 700;
  color: var(--sun, #FF8800);
  margin-bottom: 3px;
}
.ad-copy  { font-size: 0.9rem; color: #f0f4ff; line-height: 1.3; }

.ad-cta {
  text-decoration: none;
  color: var(--sun);
  font-weight: 600;
  white-space: nowrap;
}

.ad-card:hover {
  transform: translateY(-2px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Optional: slot spacing used on index.php */
.promo-slot-top, .promo-slot-after { margin: 12px 0; }

/* --- Ad card: rock-solid mobile layout --- */
@media (max-width: 640px) {
  /* Use a grid: [image][text] on the first row, CTA spans full width below */
  .ad-card {
    display: grid;
    grid-template-columns: 80px 1fr;  /* image | text */
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
  }

  .ad-card img {
    grid-column: 1;            /* left column */
    grid-row: 1 / span 2;      /* span title+copy block height */
    width: 80px;
    height: 80px;
    border-radius: 10px;
  }

  .ad-text {
    grid-column: 2;            /* right column */
    min-width: 0;              /* prevent overflow */
  }

  /* Ensure the title is readable orange on mobile too */
  .ad-title {
    color: #FF8800 !important;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    margin: 0 0 4px;
  }

  /* Show ALL copy (no clamping) */
  .ad-copy {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #e7eefc;
    display: block;
    overflow: visible;
  }

  /* Force CTA to its own full-width row under the text */
  .btn.btn-small.ad-cta,
  .ad-cta {
    grid-column: 1 / -1;       /* span both columns */
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    margin-top: 10px;
    border-radius: 8px;
    background: #FF8800;
    color: #111;
    border: 1px solid #FF8800;
    font-weight: 700;
    font-size: 0.95rem;
  }
  .btn.btn-small.ad-cta:hover,
  .ad-cta:hover {
    background: #ffb347;
    border-color: #ffb347;
  }
}
