/* PreMeny – tydlighetslager (laddas SIST på alla sidor).
   Mål: allt ska vara supertydligt. Större text, kraftigare typsnitt, högre kontrast, tydliga kanter.
   Justera här – inte i varje sida. */

:root{
  /* PreMenys egna kulörer (verktyget): guld, svart och djupgrönt. Fasta, oberoende av restaurangens accentfärg. Djupgrönt används bara på stora ytor, aldrig som statusfärg. */
  --pm-gold:#B8955A;--pm-green:#2A6B57;
  --muted:#4a4238;        /* gråtext: ca 9:1 mot kräm (var #8a8070 / #5a5248) */
  --border:#c9bfae;       /* kanter man faktiskt ser */
  --bs:#a89c86;
  --gold-ink:#7a5a1c;     /* guldton för TEXT (kontrast ≥ 5:1); ytor använder fortfarande --gold */
  --text:#1a1712;
}

html{-webkit-text-size-adjust:100%}
body{font-weight:400;font-size:17px;line-height:1.55;-webkit-font-smoothing:antialiased;color:var(--text)}
input,textarea,select{font-weight:400;border-color:var(--bs);font-size:16px}
::placeholder{color:#766c5e;opacity:1}
label{color:var(--text);font-weight:500;font-size:15px}

/* Tydlig fokusring för tangentbord */
:focus-visible{outline:3px solid var(--gold-ink);outline-offset:2px}

/* ── TEXT I GULD → LÄSBAR GULDTON ── */
[style^="color:var(--gold)"],[style*=";color:var(--gold)"],[style*="; color:var(--gold)"],[style^="color:#b8955a"],[style*=";color:#b8955a"],
.logo span,.po,.menu-item-price,.linkbox,.tnr,a[style*="--gold"]{color:var(--gold-ink)!important}
a{color:var(--gold-ink)}

/* Inline guldfyllda knappar/cirklar: vit text på guld ger för låg kontrast → mörkare guld som yta */
[style*="background:var(--gold)"],[style*="background: var(--gold)"]{background:var(--gold-ink)!important}
[style*="border-color:var(--gold)"],[style*="border-color: var(--gold)"]{border-color:var(--gold-ink)!important}

/* ── MÖRKA PANELER (t.ex. kontaktlänk-rutan, "Nästa bokning"): där ska ljus guld/ljus text vara kvar ── */
:is([style*="background:var(--dark)"],[style*="background: var(--dark)"]) :is([style*="color:var(--gold)"],[style*="color: var(--gold)"]){color:var(--gold)!important}
:is([style*="background:var(--dark)"],[style*="background: var(--dark)"]) .linkbox{color:#f4ece0!important}
:is([style*="background:var(--dark)"],[style*="background: var(--dark)"]) :is([style*="background:var(--gold)"],[style*="background: var(--gold)"]){background:var(--gold)!important;color:#1a1712!important}

/* Grön text → mörkare grön (kontrast) */
[style*="color:#3a7d44"],[style*="color: rgb(58, 125, 68)"]{color:#2b6335!important}

/* Kryssrutor och radioknappar: lätta att träffa */
input[type=checkbox],input[type=radio]{width:22px!important;height:22px!important;min-height:0}

/* ── KNAPPAR ── */
.btn{font-size:15px;font-weight:500;min-height:40px;padding:10px 18px}
.bg{border-color:var(--bs);color:var(--text)}
.bg:hover{border-color:var(--dark);color:var(--dark);background:var(--surface2)}
.bp{background:var(--dark);border-color:var(--dark);color:#fff}
.bp:hover{background:#2d2820;border-color:#2d2820}
.bo{background:var(--gold-ink);border-color:var(--gold-ink);color:#fff}
.bo:hover{opacity:1;filter:brightness(1.12)}
.bd{border-color:#b45a5a;color:#8a2020}
.bd:hover{background:#fdf2f2;border-color:#8a2020;color:#8a2020}
/* Små knappar med inline-storlek (t.ex. i superadmins restaurangkort) */
.btn[style*="font-size:11px"],.btn[style*="font-size:12px"],.btn[style*="font-size:13px"],button[style*="font-size:11px"],button[style*="font-size:12px"],button[style*="font-size:13px"],.btn[style*="font-size: 11px"],.btn[style*="font-size: 12px"],.btn[style*="font-size: 13px"],button[style*="font-size: 11px"],button[style*="font-size: 12px"],button[style*="font-size: 13px"]{font-size:14px!important;padding:8px 14px!important;min-height:38px}
select{min-height:40px}
.tab,.dtab{color:var(--text);border-color:var(--bs);font-size:15px}
.tab.active,.dtab.active{color:#fff;background:var(--dark);border-color:var(--dark)}

/* ── KORT, RAMAR, FLIKAR ── */
.card,.bcard{border-color:var(--bs)}
.bcard.open{border-color:var(--gold-ink)}
.msg{font-size:15px;line-height:1.55}

/* ── SMÅ TEXTER → LÄSBARA (klasser) ── */
.bmeta,.card-label,.empty,.trow,.grow,.aitem,.bulk-cmt,.menu-item-desc{font-size:15px}
.pill{font-size:14px;padding:6px 12px}
.menu-item-name{font-size:16px}
.menu-item-price,.tnr{font-size:15px}
.linkbox{font-size:14px}
.chead,.ahead,.bulk-head{font-size:14px;color:#4a3a10}
.cal-dn{font-size:14px;color:var(--text)}
.cal-day{font-size:15px}
.menu-item-desc,.pill.pa,.pa{color:var(--muted)}

/* ── SMÅ TEXTER → LÄSBARA (inline-stilar) ── */
[style*="font-size:9px"],[style*="font-size:10px"],[style*="font-size:11px"],[style*="font-size: 9px"],[style*="font-size: 10px"],[style*="font-size: 11px"]{font-size:14px!important}
[style*="font-size:11.5px"],[style*="font-size:12px"],[style*="font-size:12.5px"],[style*="font-size: 11.5px"],[style*="font-size: 12px"],[style*="font-size: 12.5px"]{font-size:14px!important}
[style*="font-size:13px"],[style*="font-size:13.5px"],[style*="font-size: 13px"],[style*="font-size: 13.5px"]{font-size:15px!important}
[style*="font-weight:300"],[style*="font-weight: 300"]{font-weight:400!important}
/* Grå inline-text → mörkare */
[style*="color:var(--muted)"],[style*="color: var(--muted)"]{color:var(--muted)!important}
[style*="color:#8a8070"],[style*="color:#9a9080"],[style*="color:#999"],[style*="color:#aaa"],[style*="color: #8a8070"],[style*="color: #9a9080"],[style*="color: #999"],[style*="color: #aaa"]{color:var(--muted)!important}

.rest-slug{font-size:14px;color:var(--muted)}
.sa-badge{font-size:13px!important;color:#5a4520!important}
#passToggle,button[onclick*="togglePass"]{min-width:40px;min-height:40px}
.small{font-size:15px;color:var(--muted)}
.small a{color:var(--gold-ink);font-size:15px}

/* ── GÄSTSIDAN: gästerna är många och ser inte alla lika bra → större text ── */
.nav-rest{font-size:16px;color:var(--muted)}
.booking-info,.closed-banner p,.course-sub,.meal-desc,.meal-price,.summary-row,.done-wrap p,.loading{font-size:17px}
.meal-name{font-size:18px;color:var(--text)}
.meal-comment-wrap label{font-size:16px}
.meal-comment-wrap textarea,.msg{font-size:17px}
.course-title{font-size:1.5rem}
.meal-desc{color:var(--muted);line-height:1.5}
.meal-price{color:var(--gold-ink)!important;font-weight:600}
.meal-name[style*="font-size:15px"],.meal-name[style*="font-size: 15px"]{font-size:17px!important}

@media(max-width:600px){
  body{font-size:17px}
  .btn[style*="font-size:11px"],.btn[style*="font-size:12px"],  .btn[style*="font-size: 11px"],.btn[style*="font-size: 12px"]{font-size:15px!important;min-height:44px}
}

/* ── GÄSTSIDAN: kundens färg och logga ska prägla sidan (inte PreMenys palett) ── */
body.guest .nav{background:var(--gold)!important;border-bottom:none;backdrop-filter:none;padding:.75rem 1.5rem}
body.guest .nav-rest,body.guest .nav-logo{color:var(--on-accent,#1a1712)!important;font-weight:500}
body.guest .nav-logo span{color:var(--on-accent,#1a1712)!important}
body.guest #rest-logo-wrap{background:#fff;border-radius:10px;padding:5px 10px;line-height:0}
body.guest #rest-logo-img{height:44px!important}
body.guest .btn-primary{background:var(--gold);color:var(--on-accent,#fff);border-color:var(--gold)}
body.guest .btn-primary:hover{background:var(--accent-hover,var(--gold))}
body.guest .meal.selected{background:var(--accent-tint,transparent)}
body.guest .gold-line{height:3px;opacity:1;border-radius:2px}
