/* ========================================================
   layout.css - Wordfeudgenerator.nl Styling (728px breed)
   Minimalistische 1-regel stijl met consistente 8px tussenruimtes
   ======================================================== */

/* 1. BASIS & TYPOGRAFIE */
html { margin: 0; padding: 0; height: 100%; overflow-y: scroll; }
body { font-family: Arial, Helvetica, sans-serif; margin: 0; padding: 0; min-height: 100%; background-color: #333; text-align: center; position: relative; overflow-x: hidden; width: 100%; }
* { box-sizing: border-box; }
b, strong { font-weight: bold; }
p { margin: 3px 0 10px 0; line-height: 1.5; }
h1 { font-size: 20px; font-family: Arial, Helvetica, sans-serif; color: #222; font-weight: bold; margin: 0 0 4px 0; letter-spacing: -0.2px; }
h1 .sub-title { display: block; font-size: 13px; font-weight: normal; color: #666; margin-top: 3px; }
h2 { font-size: 18px; font-family: Helvetica, Arial, sans-serif; margin: 12px 0 5px 0; color: #f19000; }
ul, ol { margin: 4px 0 12px 20px; padding: 0; }
li { margin-bottom: 5px; }

/* 2. HOOFDCONTAINER & LOGO (8PX MARGES) */
.container { max-width: 728px; width: 100%; min-height: calc(100vh - 8px); display: flex; flex-direction: column; padding: 0; margin: 8px auto 0 auto; text-align: center; position: relative; }
.header-banner { width: 100%; margin: 0 0 8px 0; border-radius: 8px; overflow: hidden; line-height: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.header-banner img { width: 100%; height: auto; display: block; }

/* 3. INVOERKAART & GRID (VLAKKE STIJL, 8PX MARGE) */
form#zend { margin: 0; padding: 0; width: 100%; }
.search-card { color: #333; background-color: #eee; padding: 12px 14px 14px 14px; border-radius: 8px; margin: 0 0 8px 0; text-align: left; font-size: 14px; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,0.2); width: 100%; }
.search-grid { display: grid; grid-template-columns: 32% 66%; gap: 8px 2%; align-items: center; width: 100%; }
.grid-label { color: #333; font-size: 15px; text-align: left; font-weight: bold; cursor: pointer; user-select: none; white-space: nowrap; }
.grid-input, .grid-select, .grid-btn { width: 100%; }
.letters_input, .aansluitpunt, .zoekknop, a.wissen { height: 38px; line-height: 38px; outline: none; border: 1px solid #aaa; border-radius: 5px; margin: 0; width: 100%; display: block; }
.letters_input { font-size: 17px; color: #222; padding: 0 10px; background-color: #fff; font-weight: bold; letter-spacing: 0.5px; text-transform: uppercase; }
.letters_input::placeholder { color: #888; font-size: 13px; font-weight: normal; }
.aansluitpunt { -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important; font-size: 14px; color: #333; background-color: #ddd; cursor: pointer; text-align: left; padding: 0 22px 0 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.zoekknop, a.wissen { font-size: 14px; color: #222; background-color: #ddd; cursor: pointer; text-align: center; text-decoration: none; font-weight: 500; transition: background-color 0.15s ease; }
.zoekknop { font-weight: bold; font-size: 15px; }
.zoekknop:hover, a.wissen:hover { background-color: #e5e5e5; }
.zoekknop:active, a.wissen:active { background-color: #d0d0d0; }

/* 4. AD BANNERS (8PX MARGE ONDERLING) */
.ad-wrapper, .ad-slot-box { width: 728px; height: 90px; min-height: 90px; max-height: 90px; margin: 0 auto 8px auto; text-align: center; overflow: hidden !important; position: relative; display: flex; justify-content: center; align-items: center; background: transparent; }
.ad-link { display: block; line-height: 0; text-decoration: none; width: 728px; height: 90px; }
.ad-link img, .ad-fallback-img { display: block; width: 728px; height: 90px; border: 0; border-radius: 6px; }
.ad-slot-fallback { line-height: 0; text-decoration: none; width: 728px; height: 90px; }
.ad-slot-google { display: inline-block; width: 100%; height: 100%; max-height: 90px; overflow: hidden !important; }
.ad-slot-google ins { width: 728px !important; height: 90px !important; max-height: 90px !important; overflow: hidden !important; }
.ad-slot-google iframe { width: 728px !important; height: 90px !important; max-height: 90px !important; }

/* 5. CONTENT KAARTEN (8PX MARGE) */
.content-card { width: 100%; border-radius: 8px; margin: 0 auto 8px auto; text-align: left; font-size: 14px; line-height: 1.55em; background: #eee; color: #333; padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.content-card a { color: #f19000; font-weight: bold; text-decoration: underline; }
.tip-box { background-color: #e5e5e5; border: 1px solid #ccc; border-radius: 6px; padding: 12px 14px; margin: 12px 0 2px 0; color: #222; line-height: 1.5em; }
.tip-code { background-color: #ffffff; border: 1px solid #bbb; color: #d17000; padding: 2px 7px; border-radius: 4px; font-family: monospace; font-size: 14px; font-weight: bold; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* 6. GECOMBINEERDE TABELKOP & RESULTATENTABEL */
.tabel-kop-geheel { width: 100%; margin: 0 auto; background-color: #bbb; border-radius: 8px 8px 0 0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.tabel-aantal-balk { padding: 6px 12px; text-align: center; font-size: 13px; color: #222; font-weight: 500; border-bottom: 1px solid #aaa; background-color: #b0b0b0; }
.tabel-aantal-balk b { font-weight: bold; }
.sorttabel { width: 100%; margin: 0 auto; background-color: #bbb; color: #222; font-weight: bold; font-size: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.sortleft { padding: 0 10px; height: 28px; line-height: 28px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.sorttabel > .sortleft:first-child { border-right: 1px solid #999; }
.woordentabel { width: 100%; margin: 0 auto 8px auto; background-color: #ddd; border-radius: 0 0 8px 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.2); display: grid; grid-template-columns: 1fr 1fr; }
.woord-row { padding: 0 10px; height: 28px; line-height: 28px; font-size: 14px; display: flex; align-items: center; }
.woordentabel > .woord-row:nth-child(odd) { border-right: 1px solid #aaa; }
.woordentabel > .woord-row:nth-child(even) { border-right: none; }
.woordentabel > .woord-row:nth-child(4n+1), .woordentabel > .woord-row:nth-child(4n+2) { background-color: #ccc; }
.woordentabel > .woord-row:nth-child(4n+3), .woordentabel > .woord-row:nth-child(4n+4) { background-color: #ddd; }
.col-punten { width: 60px; text-align: left; flex-shrink: 0; color: #222; }
.col-woord { flex-grow: 1; text-align: left; letter-spacing: 0.12em; font-weight: 700; color: #333; cursor: pointer; user-select: none; transition: opacity 0.1s ease; }
.col-woord:active { opacity: 0.5; color: #f19000; }
.col-aantal { width: 50px; text-align: right; flex-shrink: 0; color: #444; }
.col-woord .joker, .col-woord .wildcard { display: inline-block; transform: skewX(-5deg); color: #555; position: relative; line-height: 1; vertical-align: baseline; text-decoration: underline; }

/* TOAST MELDING BIJ KOPIËREN */
#toast-kopieer { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20, 20, 20, 0.92); color: #fff; padding: 9px 20px; border-radius: 25px; font-size: 13px; font-weight: bold; box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 999999; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; border: 1px solid #444; }
#toast-kopieer.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 7. FOOTER (WORDFEUD ORANJE) */
.footer { width: 100%; height: 38px; background-color: #f19000; border-radius: 6px; margin-top: auto; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.25); position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 12px; color: #fff; }
.footer a { color: #fff; text-decoration: none; font-weight: 500; }
.footer a:hover { text-decoration: underline; }
.footer-left { text-align: left; }
.footer-center { text-align: center; font-weight: bold; }
.footer-right { display: flex; align-items: center; gap: 6px; }
.footer-flag { height: 14px; width: auto; vertical-align: middle; border-radius: 2px; }

/* 8. MEDIA QUERIES (RESPONSIVE VOOR MOBIEL) */
@media (max-width: 740px) {
  .container { padding: 0 8px; margin: 8px auto 0 auto; min-height: calc(100vh - 8px); }
  .header-banner, .search-card, .content-card, .woordentabel, .tabel-kop-geheel { margin-bottom: 8px !important; }
  .tabel-aantal-balk { font-size: 12px; padding: 5px 8px; }
  .ad-wrapper, .ad-slot-box { width: 320px !important; height: 100px !important; min-height: 100px !important; max-height: 100px !important; min-width: 320px; position: relative; left: 50%; transform: translateX(-50%); margin: 0 0 8px 0 !important; overflow: hidden !important; }
  .ad-link, .ad-slot-fallback { width: 320px !important; height: 100px !important; }
  .ad-link img, .ad-fallback-img { width: 320px !important; height: 100px !important; }
  .ad-slot-google { max-height: 100px !important; overflow: hidden !important; }
  .ad-slot-google ins { width: 320px !important; height: 100px !important; max-height: 100px !important; overflow: hidden !important; }
  .ad-slot-google iframe { width: 320px !important; height: 100px !important; max-height: 100px !important; }
  
  #header-onder { display: none !important; }
  
  .sorttabel { grid-template-columns: 1fr; }
  .sortleft:nth-child(2) { display: none; }
  .sorttabel > .sortleft:first-child { border-right: none; }
  .woordentabel { grid-template-columns: 1fr; }
  .woord-row { width: 100% !important; border-right: none !important; }
  .woordentabel > .woord-row:nth-child(odd) { background-color: #ccc !important; }
  .woordentabel > .woord-row:nth-child(even) { background-color: #ddd !important; }
  .footer { font-size: 11px; padding: 0 8px; height: 36px; }
}

@media (max-width: 600px) {
  .content-card { font-size: 13px; line-height: 1.5; padding: 13px; }
  .tip-box { font-size: 12px; padding: 10px 12px; }
  .letters_input::placeholder { font-size: 12px; }
}

@media (max-width: 480px) {
  .search-grid { grid-template-columns: 32% 66%; gap: 6px 2%; }
  .grid-label { font-size: 13px; }
  .letters_input { font-size: 15px; }
  .letters_input::placeholder { font-size: 11px; }
  .aansluitpunt, .zoekknop, a.wissen { font-size: 13px; }
  h1 { font-size: 18px; }
  h1 .sub-title { font-size: 12px; }
}