/* Trust Offers - theme-agnostic styles. Accent color comes from Settings (--to-accent). */

:root { --to-accent: #0b6b4f; }
.to-wrap, .to-listing, .to-single { --to-ink: #1d2327; --to-muted: #646970; --to-line: #e2e4e7; --to-bg: #fff; }

/* Filters */
.to-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.to-filters select { padding: 9px 12px; border: 1px solid var(--to-line); border-radius: 8px; background: var(--to-bg); min-width: 160px; }
.to-filters .to-btn { width: auto; }

/* Grid */
.to-grid { display: grid; grid-template-columns: repeat(var(--to-cols, 3), minmax(0, 1fr)); gap: 22px; }
.to-grid--compact { --to-cols: 3; gap: 16px; }
@media (max-width: 900px) { .to-grid, .to-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .to-grid, .to-grid--compact { grid-template-columns: 1fr; } }

/* Card */
.to-card { background: var(--to-bg); border: 1px solid var(--to-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.to-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.to-card--featured { border-color: var(--to-accent); box-shadow: 0 0 0 1px var(--to-accent); }
.to-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: #f0f2f4; }
.to-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.to-card__ph { position: absolute; inset: 0; background: linear-gradient(135deg, #eef1f3, #dfe4e8); }
.to-badge { position: absolute; left: 12px; bottom: 12px; background: var(--to-accent); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .3px; padding: 6px 12px; border-radius: 999px; line-height: 1.1; }
.to-badge--inline { position: static; display: inline-block; font-size: 16px; padding: 8px 16px; }
.to-flag { position: absolute; right: 12px; top: 12px; background: #fff; color: var(--to-accent); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.to-card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.to-card__biz { font-size: 13px; color: var(--to-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.to-card__title { margin: 0; font-size: 18px; line-height: 1.3; }
.to-card__title a { color: var(--to-ink); text-decoration: none; }
.to-card__meta { margin: 0 0 8px; font-size: 13px; color: var(--to-muted); }
.to-card .to-btn { margin-top: auto; }

/* Pill + button */
.to-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--to-accent); color: var(--to-accent); line-height: 1.5; }
.to-pill--sponsored { border-color: var(--to-muted); color: var(--to-muted); }
.to-card--house { background: #f7fbf9; }
.to-btn { display: inline-block; text-align: center; background: var(--to-accent); color: #fff !important; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 0; text-decoration: none !important; cursor: pointer; }
.to-btn:hover { filter: brightness(1.08); }

/* Listing block */
.to-listing { margin: 28px 0; }
.to-listing__title { margin: 0 0 14px; }
.to-listing__empty { margin: 0; color: var(--to-muted); }
.to-listing__empty a { color: var(--to-accent); font-weight: 600; }

/* Single offer */
.to-single__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.to-single__biz { color: var(--to-muted); }
.to-redeem { background: #f6f8f9; border: 1px solid var(--to-line); border-radius: 12px; padding: 20px; margin: 24px 0; }
.to-redeem h3 { margin: 0 0 8px; }
.to-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 2px dashed var(--to-accent); border-radius: 10px; padding: 12px 16px; margin: 14px 0 18px; background: #fff; }
.to-code span { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--to-muted); }
.to-code strong { font-size: 22px; letter-spacing: 1px; }
.to-copy { margin-left: auto; background: transparent; border: 1px solid var(--to-line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.to-notice { background: #fff8e5; border: 1px solid #f0d78c; border-radius: 10px; padding: 14px 18px; margin: 24px 0; }
.to-terms, .to-valid { font-size: 13px; color: var(--to-muted); }
.to-empty { padding: 32px; text-align: center; color: var(--to-muted); border: 1px dashed var(--to-line); border-radius: 12px; }

/* Search box */
.to-search { margin: 0 0 16px; }
.to-search__input { width: 100%; max-width: 420px; padding: 10px 14px; border: 1px solid var(--to-line); border-radius: 8px; background: var(--to-bg); font-size: 16px; }
.to-card[hidden], .to-search__empty[hidden] { display: none !important; }
.to-search__empty { padding: 24px; text-align: center; color: var(--to-muted); }
.to-wrap .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.to-single__img { width: 100%; max-width: 640px; height: auto; border-radius: 12px; margin-bottom: 16px; display: block; }
