/* TodayGlobalMarket — Full-screen, Mobile-first shared styles */

/* Brand & tokens */
:root{
  --tgm-brand-1:#9c1659;
  --tgm-brand-2:#cc2d7e;
  --tgm-radius:16px;
  --tgm-card-bg: var(--bs-body-bg);
  --tgm-border: var(--bs-border-color);
  --tgm-soft: rgba(0,0,0,.04);
  --tgm-shadow: 0 4px 18px rgba(0,0,0,.06);
}
[data-bs-theme="dark"]{
  --tgm-soft: rgba(255,255,255,.05);
  --tgm-shadow: 0 6px 22px rgba(0,0,0,.35);
}

/* Full-screen wrappers */
.tgm-full{
  min-height: 100svh; /* mobile viewport units */
  background: var(--bs-body-bg);
}

/* Safe-area paddings + global horizontal rhythm */
.tgm-wrap{
  padding-left: clamp(12px, 3.2vw, 28px);
  padding-right: clamp(12px, 3.2vw, 28px);
}
@supports (padding: max(0px)){
  .tgm-wrap{
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* Edge-to-edge sections */
.tgm-edge{ width:100%; }
.tgm-hero{
  background: linear-gradient(180deg, rgba(156,22,89,.08), transparent 70%);
  padding-top: 12px; padding-bottom: 12px;
}
@media (min-width: 768px){
  .tgm-hero{ padding-top: 16px; padding-bottom: 16px; }
}

/* Mobile sticky toolbar (filters button) */
.tgm-mobile-toolbar{
  position: sticky; top: 56px; /* under navbar */
  z-index: 1029; background: var(--bs-body-bg);
  padding: 8px 12px; border-bottom: 1px solid var(--bs-border-color);
}

/* Cards, tiles, lists */
.tgm-card{
  background: var(--tgm-card-bg);
  border: 1px solid var(--tgm-border);
  border-radius: var(--tgm-radius);
  padding: 14px;
  box-shadow: var(--tgm-shadow);
}
.tgm-card-hover{ transition: transform .15s ease, box-shadow .2s ease; }
.tgm-card-hover:hover{ transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.08); }

.tgm-section{ }
.tgm-section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.tgm-section-title{ font-size:1.12rem; font-weight:800; margin:0; }
.tgm-link{ font-size:.875rem; text-decoration:none; }
.tgm-link:hover{ text-decoration:underline; }

.tgm-tile{
  background:var(--tgm-card-bg);
  border:1px solid var(--tgm-border);
  border-radius:14px;
  padding:12px;
}
.tgm-tile-title{ font-weight:700; font-size:.95rem; line-height:1.15; }
.tgm-tile-meta{ font-size:.75rem; color:var(--bs-secondary-color); margin-top:2px; }
.tgm-tile-price{ font-size:1.15rem; font-weight:800; margin:.25rem 0 .15rem; }

.tgm-delta{ font-size:.85rem; font-weight:700; }
.tgm-up{ color:var(--bs-success) }
.tgm-down{ color:var(--bs-danger) }
.tgm-flat{ color:var(--bs-secondary-color) }
.tgm-badge{ font-size:.7rem; font-weight:700; padding:.25rem .45rem; border-radius:999px; }
.tgm-badge-up{ background:rgba(25,135,84,.12); color:#198754; }
.tgm-badge-down{ background:rgba(220,53,69,.12); color:#dc3545; }
.tgm-badge-flat{ background:rgba(108,117,125,.12); color:#6c757d; }

.tgm-cover{ width:100%; height:160px; object-fit:cover; border-top-left-radius:12px; border-top-right-radius:12px; }
.tgm-cover.placeholder{ background:var(--tgm-soft); }
.tgm-news-img{ width:100%; height:140px; object-fit:cover; border-radius:12px; margin-bottom:.5rem; }
.tgm-media iframe{ border:0; }

.poster-tile{ padding:10px; text-align:center; }
.tgm-poster{ width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:12px; }
.tgm-poster.placeholder{ background:var(--tgm-soft); }
.tgm-poster-title{ font-size:.9rem; font-weight:700; margin-top:.35rem; }
.tgm-poster-meta{ font-size:.75rem; color:var(--bs-secondary-color); }

.tgm-list-item{
  display:flex; align-items:center; justify-content:space-between;
  border:1px dashed var(--tgm-border);
  border-radius:12px; padding:10px 12px; background:var(--tgm-card-bg);
}
.tgm-list-meta{ font-size:.8rem; color:var(--bs-secondary-color); }
.tgm-list-link{ padding:.8rem 1rem; }

.tgm-muted{ color:var(--bs-secondary-color) }
.tgm-price{ font-weight:700; margin-top:.25rem; }
.tgm-footnote{ font-size:.75rem; color:var(--bs-secondary-color); margin-top:.25rem; }

/* Buttons (brand) */
.btn-primary{
  background: linear-gradient(90deg, var(--tgm-brand-1), var(--tgm-brand-2));
  border: none;
}
.btn-primary:hover{ filter: brightness(.95); }
.btn-outline-primary{ border-color:var(--tgm-brand-1); color:var(--tgm-brand-1); }
.btn-outline-primary:hover{
  background: linear-gradient(90deg, var(--tgm-brand-1), var(--tgm-brand-2));
  border-color: transparent; color:#fff;
}

/* Desktop spacing tweaks */
@media (min-width: 992px){
  .tgm-card{ padding:16px; }
}


