/* Giveaways: single giveaway page and [garib_giveaways]. Colours come from the theme's variables, light or dark. */
.gw { margin: 0 0 2em; }

.gw-head { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 1.5em; }
.gw-prize { margin: 0; display: grid; gap: 2px; }
.gw-prize span, .gw-label { color: var(--muted); font-size: 14px; margin: 0; }
.gw-prize strong { font-family: var(--font-head); font-size: clamp(22px, 6vw, 30px); line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.gw-when { justify-self: start; margin: 0; padding: 2px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.gw-small { color: var(--muted); font-size: 14px; margin: 0; }

.gw-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 1.5em 0; scroll-margin-top: 90px; }
.gw-box > h2:first-child, .gw-box > div:first-child > h2 { margin-top: 0; }

.gw-form { display: grid; gap: 18px; }
.gw-field { display: grid; gap: 6px; min-width: 0; }
.gw-field > label { font-weight: 700; color: var(--text); }
.gw-form input[type="text"], .gw-form input[type="tel"], .gw-form select {
  width: 100%; min-height: 50px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.gw-form :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gw-tel { display: flex; min-width: 0; }
.gw-tel span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; font-weight: 700; }
.gw-tel input[type="tel"] { flex: 1; min-width: 0; border-radius: 0 10px 10px 0; }
.gw-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
.gw-check input { flex: 0 0 24px; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent); }
.gw-invalid input, .gw-invalid select { border-color: var(--red); }
.gw-error { color: var(--red); font-weight: 600; font-size: 15px; margin: 0; }
.gw-alert { margin: 0; padding: 12px 14px; border: 1px solid var(--red); border-left-width: 4px; border-radius: 10px; color: var(--text); }
.gw-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gw-form .btn { width: 100%; min-height: 52px; font-size: 18px; }

.gw-guide { margin-top: 18px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; justify-items: start; }
.gw-guide h3, .gw-guide p { margin: 0; }

.gw-winners { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.gw-winners li { padding: 10px 14px; background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 8px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }

.gw-rules { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gw-rules summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; padding: 0 18px; font-weight: 700; color: var(--text); }
.gw-rules ol { margin: 0; padding: 0 18px 18px 38px; color: var(--muted); }
.gw-rules li { margin: 0 0 8px; }

.gw-none { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); }
.gw-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 0 0 2em; }
.gw-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.gw-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gw-card__body { display: grid; gap: 6px; padding: 16px; flex: 1; align-content: start; }
.gw-card h2 { font-size: 20px; margin: 0; line-height: 1.3; }
.gw-card h2 a { color: var(--text); text-decoration: none; }
.gw-card__prize { margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.gw-card .btn { margin-top: 8px; text-align: center; min-height: 48px; }
.gw-past { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.gw-past h2 { margin-top: 0; }
.gw-past p { margin: 0 0 8px; }

@media (min-width: 600px) {
  .gw-form .btn { width: auto; justify-self: start; }
  .gw-box { padding: 24px; }
}
