/*
Theme Name: Timbok
Theme URI: https://timbok.se
Author: Timbok
Description: Webbplats för Timbok – tidrapportering, arbetsordrar, planering och löneunderlag för hantverksföretag. Samma utseende som appen och Almen52. Skapar sidorna Start, Funktioner, Priser, Kontakt och Integritetspolicy när temat aktiveras.
Version: 1.6.15
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: timbok
*/

/* Utseende: appens familj – grå botten, vita kort med 16 px rundning, Barlow. Grafitblå accent, lime bara i loggan. */
:root{
  --tb-radius:16px;
  --tb-shadow:0 1px 2px rgba(0,0,0,.05),0 12px 32px -12px rgba(0,0,0,.18);
  --tb-shadow-big:0 2px 4px rgba(0,0,0,.06),0 30px 60px -20px rgba(31,31,31,.35);
}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,h3{text-wrap:balance}
p{text-wrap:pretty}
img{max-width:100%;height:auto}
:focus-visible{outline:2px solid var(--wp--preset--color--accent);outline-offset:3px}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}

/* ---------- Sidhuvud ---------- */
.tb-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.88);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--wp--preset--color--linje)}
.admin-bar .tb-header{top:32px}
@media (max-width:782px){.admin-bar .tb-header{top:46px}}
.tb-header__inner{min-height:68px;gap:1.5rem}
.tb-brand{gap:.6rem!important;text-decoration:none}
.tb-brand .wp-block-image{margin:0}
.tb-brand img{width:34px;height:34px;border-radius:9px;display:block}
.tb-brand .wp-block-site-title{font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:700;font-size:1.65rem;line-height:1;margin:0}
.tb-brand .wp-block-site-title a{color:var(--wp--preset--color--text);text-decoration:none}
.tb-header .wp-block-navigation a{text-decoration:none;color:var(--wp--preset--color--text)}
.tb-header .wp-block-navigation a:hover{color:var(--wp--preset--color--accent)}
.tb-header .wp-block-navigation .current-menu-item>a{color:var(--wp--preset--color--accent)}
.tb-header .wp-block-buttons{gap:.5rem}
.tb-header .wp-block-button__link{padding:.55rem 1rem;font-size:.95rem}
@media (max-width:720px){.tb-header .tb-login{display:none}}

/* Knappar */
.wp-block-button.is-style-outline>.wp-block-button__link{background:transparent;color:var(--wp--preset--color--text);border:1.5px solid var(--wp--preset--color--linje)}
.wp-block-button.is-style-outline>.wp-block-button__link:hover{border-color:var(--wp--preset--color--accent);color:var(--wp--preset--color--accent);background:transparent}
.tb-btn-white .wp-block-button__link{background:#fff;color:var(--wp--preset--color--text)}
.tb-btn-white .wp-block-button__link:hover{background:#F2F2F2;color:var(--wp--preset--color--text)}
.tb-btn-ghost-light .wp-block-button__link{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.4)}
.tb-btn-ghost-light .wp-block-button__link:hover{background:rgba(255,255,255,.1);color:#fff}

/* ---------- Gemensamt ---------- */
.tb-section{padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)}
.tb-section--tight{padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)}
.tb-white{background:var(--wp--preset--color--yta)}
.tb-eyebrow{font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:600;font-size:1rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--accent);margin-bottom:.25rem!important}
.tb-lead{font-size:var(--wp--preset--font-size--stor);color:var(--wp--preset--color--dampad);max-width:38rem}
.tb-center{text-align:center}
.tb-center .tb-lead{margin-left:auto;margin-right:auto}
.tb-muted{color:var(--wp--preset--color--dampad)}
.tb-small{font-size:var(--wp--preset--font-size--liten)}
.tb-card{background:var(--wp--preset--color--yta);border-radius:var(--tb-radius);padding:clamp(1.25rem,3vw,1.75rem)!important;box-shadow:var(--tb-shadow)}
.tb-white .tb-card{background:var(--wp--preset--color--bakgrund);box-shadow:none}
.tb-card h3{margin-top:0}
.tb-card p:last-child{margin-bottom:0}

/* ---------- Hero ---------- */
.tb-hero{padding-top:clamp(2.5rem,7vw,5.5rem);padding-bottom:var(--wp--preset--spacing--50);overflow:hidden}
.tb-hero h1{margin:0;letter-spacing:-.015em}
.tb-hero h1 em{font-style:normal;color:var(--wp--preset--color--accent)}
.tb-hero .tb-lead{margin-top:1.25rem}
.tb-hero__cols{align-items:center!important;gap:clamp(2rem,5vw,4rem)!important}
.tb-proof{display:flex;flex-wrap:wrap;gap:.4rem .9rem;margin-top:1.25rem;color:var(--wp--preset--color--dampad);font-size:.95rem;list-style:none;padding:0}
.tb-proof li{display:flex;align-items:center;gap:.4rem}
.tb-proof li::before{content:"";width:16px;height:16px;flex:none;border-radius:50%;background:var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}

/* Skärmbilder: dator i webbläsarram + telefon ovanpå (vanliga bildblock, går att byta i redigeraren) */
.tb-shots{position:relative;padding-bottom:22%;margin:0}
.tb-shots>.wp-block-image{margin:0}
.wp-block-image.tb-browser{background:#fff;border-radius:14px;box-shadow:var(--tb-shadow-big);overflow:hidden;border:1px solid rgba(0,0,0,.06);padding-top:30px;position:relative;margin:0}
.wp-block-image.tb-browser::before{content:"";position:absolute;left:0;right:0;top:0;height:30px;background:radial-gradient(circle at 17px 15px,#D2D2D2 5px,transparent 5.5px),radial-gradient(circle at 35px 15px,#D2D2D2 5px,transparent 5.5px),radial-gradient(circle at 53px 15px,#D2D2D2 5px,transparent 5.5px),#F4F4F4;border-bottom:1px solid #E6E6E6}
.wp-block-image.tb-browser img{display:block;width:100%}
.wp-block-image.tb-phone{position:absolute;right:-3%;bottom:0;width:24%;max-width:210px;background:#181818;padding:2.2%;border-radius:clamp(22px,4vw,40px);box-shadow:var(--tb-shadow-big);margin:0}
.wp-block-image.tb-phone img{display:block;width:100%;border-radius:clamp(16px,3vw,30px)}
.wp-block-image.tb-phone.tb-phone--solo{position:relative;right:auto;bottom:auto;width:100%;max-width:300px;margin:0 auto;padding:12px;border-radius:44px}
.wp-block-image.tb-phone.tb-phone--solo img{border-radius:34px}
@media (max-width:781px){.tb-shots{margin-top:1rem;padding-bottom:30%}.wp-block-image.tb-phone{right:0;width:30%}}

/* Chips som i appen */
.tb-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.75rem 0 0;padding:0;list-style:none}
.tb-chips li{font-size:.8rem;font-weight:600;border:1px solid currentColor;border-radius:5px;padding:.05rem .45rem;line-height:1.5}
.tb-chip-kvall{color:#2F7FC1}.tb-chip-natt{color:#1F1F1F}.tb-chip-helg{color:#9A6408}.tb-chip-storhelg{color:#C23B2E}.tb-chip-trakt{color:#2E8B57}

/* ---------- Funktionskort ---------- */
.tb-features{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:1rem!important}
.tb-features>.tb-card{margin:0!important}
.tb-ico{width:44px;height:44px;border-radius:12px;background:color-mix(in srgb,var(--wp--preset--color--accent) 12%,#fff);display:grid;place-items:center;margin:0 0 .9rem}
.tb-white .tb-ico{background:#fff}
.tb-ico svg{width:24px;height:24px;color:var(--wp--preset--color--accent)}

/* Steg */
.tb-steps{counter-reset:tbstep}
.tb-step{position:relative;padding-top:3.25rem!important}
.tb-step::before{counter-increment:tbstep;content:counter(tbstep);position:absolute;top:1.25rem;left:clamp(1.25rem,3vw,1.75rem);width:36px;height:36px;border-radius:50%;background:var(--wp--preset--color--accent);color:#fff;font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:700;font-size:1.25rem;display:grid;place-items:center}

/* Sektion med bild bredvid */
.tb-split{align-items:center!important;gap:clamp(2rem,5vw,4.5rem)!important}
.tb-split .wp-block-list{padding-left:0;list-style:none;display:grid;gap:.55rem}
.tb-split .wp-block-list li{padding-left:1.7rem;position:relative}
.tb-split .wp-block-list li::before{content:"";position:absolute;left:0;top:.3em;width:18px;height:18px;border-radius:50%;background:color-mix(in srgb,var(--wp--preset--color--accent) 14%,#fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%2344546A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat}
.tb-split--flip>.wp-block-column:first-child{order:2}
@media (max-width:781px){.tb-split--flip>.wp-block-column:first-child{order:0}}
.tb-figure{margin:0}
.tb-figure img{border-radius:14px;box-shadow:var(--tb-shadow-big);display:block}

/* Almen52-band */
.tb-almen{background:linear-gradient(135deg,#3A4658,#1F262F);color:#fff;border-radius:calc(var(--tb-radius) + 8px);padding:clamp(1.75rem,5vw,3.5rem)!important;overflow:hidden}
.tb-almen h2,.tb-almen h3{color:#fff}
.tb-almen .tb-eyebrow{color:#C9D6E8}
.tb-almen p{color:rgba(255,255,255,.82)}
.tb-almen .tb-cal{background:#fff;color:#1F1F1F;border-radius:14px;padding:14px;box-shadow:0 20px 40px -16px rgba(0,0,0,.5);font-size:.9rem}
.tb-cal__head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}
.tb-cal__head b{font-family:var(--wp--preset--font-family--barlow-condensed);font-size:1.3rem}
.tb-cal__head span{font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:600;letter-spacing:.08em;color:#44546A;font-size:.85rem}
.tb-cal__ev{display:grid;grid-template-columns:46px 1fr;gap:8px;padding:8px 10px;border-radius:8px;background:#EDEDED;border-left:4px solid var(--c,#4A6FA5);margin-top:6px}
.tb-cal__ev small{display:block;color:#626262}
.tb-cal__ev .t{font-weight:600;color:#626262;font-size:.8rem}
.tb-cal__tag{display:inline-block;font-size:.7rem;font-weight:700;background:#4A6FA5;color:#fff;border-radius:99px;padding:1px 7px;margin-left:4px;vertical-align:1px}

/* ---------- Priser ---------- */
.tb-price{background:var(--wp--preset--color--yta);border-radius:calc(var(--tb-radius) + 6px);padding:clamp(1.75rem,4vw,2.75rem)!important;box-shadow:var(--tb-shadow-big);border:2px solid var(--wp--preset--color--accent);position:relative}
.tb-price__badge{position:absolute;top:-14px;left:clamp(1.75rem,4vw,2.75rem);background:var(--wp--preset--color--accent);color:#fff;font-weight:700;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;border-radius:99px;padding:.3rem .8rem;margin:0!important}
.tb-price__amount{font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:700;font-size:clamp(3.5rem,8vw,4.75rem);line-height:1;margin:0!important}
.tb-price__amount span{font-size:1.5rem;font-weight:600}
.tb-price__per{color:var(--wp--preset--color--dampad);margin-top:.35rem!important}
.tb-price .wp-block-list{padding-left:0;list-style:none;display:grid;gap:.5rem;margin:1.25rem 0}
.tb-price .wp-block-list li{padding-left:1.7rem;position:relative}
.tb-price .wp-block-list li::before{content:"";position:absolute;left:0;top:.3em;width:18px;height:18px;border-radius:50%;background:var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat}
.tb-price .wp-block-buttons,.tb-price .wp-block-button,.tb-price .wp-block-button__link{width:100%}
.tb-price .wp-block-button__link{text-align:center}
.tb-compare{border-collapse:collapse;width:100%;font-size:.98rem}
.tb-compare th,.tb-compare td{padding:.7rem .75rem;border-bottom:1px solid var(--wp--preset--color--linje);text-align:left}
.tb-compare th{font-family:var(--wp--preset--font-family--barlow-condensed);font-weight:600;letter-spacing:.06em;text-transform:uppercase;font-size:.9rem;color:var(--wp--preset--color--dampad)}

/* ---------- FAQ ---------- */
.tb-faq .wp-block-details{background:var(--wp--preset--color--yta);border-radius:12px;margin:0 0 .6rem!important}
.tb-white .tb-faq .wp-block-details{background:var(--wp--preset--color--bakgrund)}
.tb-faq summary{font-weight:600;font-size:1.08rem;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:1rem;align-items:center}
.tb-faq summary::-webkit-details-marker{display:none}
.tb-faq summary::after{content:"";width:9px;height:9px;flex:none;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-3px);transition:transform .2s}
.tb-faq details[open] summary::after{transform:rotate(-135deg) translateY(-2px)}
.tb-faq details>*:not(summary){margin-top:.75rem;color:var(--wp--preset--color--dampad)}

/* ---------- Avslutande uppmaning ---------- */
.tb-cta{background:var(--wp--preset--color--text);color:#fff;border-radius:calc(var(--tb-radius) + 8px);padding:clamp(2rem,6vw,4rem)!important;text-align:center}
.tb-cta h2{color:#fff}
.tb-cta p{color:rgba(255,255,255,.75)}
.tb-cta .wp-block-buttons{justify-content:center}

/* ---------- Sidfot ---------- */
.tb-footer{background:var(--wp--preset--color--yta);border-top:1px solid var(--wp--preset--color--linje);padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--40);font-size:.95rem}
.tb-footer h4{font-family:var(--wp--preset--font-family--barlow-condensed);font-size:1rem;letter-spacing:.08em;text-transform:uppercase;color:var(--wp--preset--color--dampad);margin-bottom:.5rem}
.tb-footer .wp-block-list{list-style:none;padding:0;margin:0;display:grid;gap:.35rem}
.tb-footer a{color:var(--wp--preset--color--text);text-decoration:none}
.tb-footer a:hover{color:var(--wp--preset--color--accent);text-decoration:underline}
.tb-footer__bottom{border-top:1px solid var(--wp--preset--color--linje);margin-top:var(--wp--preset--spacing--40)!important;padding-top:1rem;color:var(--wp--preset--color--dampad);font-size:.875rem}

/* ---------- Sidhuvud på undersidor ---------- */
.tb-pagehead{padding-top:clamp(2.5rem,6vw,4.5rem);padding-bottom:var(--wp--preset--spacing--40)}
.tb-pagehead h1{font-size:clamp(2.5rem,6vw,3.75rem);margin:0}
.tb-prose{background:var(--wp--preset--color--yta);border-radius:var(--tb-radius);padding:clamp(1.5rem,5vw,3rem)!important}
.tb-prose h2{font-size:1.75rem;margin-top:2rem}
.tb-prose h2:first-child{margin-top:0}

/* ---------- Kontaktformulär ---------- */
.tb-form{display:grid;gap:1rem}
.tb-form .tb-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
@media (max-width:600px){.tb-form .tb-row{grid-template-columns:1fr}}
.tb-form label{display:grid;gap:.35rem;font-size:.8rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--wp--preset--color--dampad)}
.tb-form input,.tb-form select,.tb-form textarea{font:inherit;font-size:1rem;letter-spacing:0;text-transform:none;color:var(--wp--preset--color--text);background:var(--wp--preset--color--bakgrund);border:1px solid var(--wp--preset--color--linje);border-radius:10px;padding:.75rem .85rem;width:100%}
.tb-form input:focus,.tb-form select:focus,.tb-form textarea:focus{outline:2px solid var(--wp--preset--color--accent);outline-offset:1px;background:#fff}
.tb-form textarea{min-height:140px;resize:vertical}
.tb-form .tb-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.tb-form button{justify-self:start;font:inherit;font-weight:600;font-size:1.0625rem;background:var(--wp--preset--color--accent);color:#fff;border:0;border-radius:10px;padding:.85rem 1.5rem;cursor:pointer}
.tb-form button:hover{background:var(--wp--preset--color--accent-mork)}
.tb-form .tb-consent{font-size:.85rem;color:var(--wp--preset--color--dampad);text-transform:none;letter-spacing:0;font-weight:400}
.tb-notice{border-radius:10px;padding:.85rem 1rem;font-weight:500}
.tb-notice--ok{background:#E3F2E9;color:#1E6B42}
.tb-notice--fel{background:#F8E1DE;color:#9B2C21}

/* Blogg/standardsidor */
.tb-main{padding-bottom:var(--wp--preset--spacing--60)}
.wp-block-post-template{gap:1rem}

/* Formulär och ingresser i begränsade grupper */
.tb-form *,.tb-form *::before,.tb-form *::after{box-sizing:border-box}
.tb-form .tb-row>label{min-width:0}
.is-layout-constrained>.tb-lead{margin-left:0!important;margin-right:auto!important}
.tb-center.is-layout-constrained>.tb-lead,.tb-center .tb-lead{margin-left:auto!important;margin-right:auto!important}
.tb-pkgs{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.25rem;margin-top:2rem!important;margin-bottom:1.5rem!important}
.tb-price--sm{box-shadow:none;border:1px solid var(--wp--preset--color--linje);padding:1.5rem!important;display:flex;flex-direction:column;margin:0!important}
.tb-price--sm .wp-block-buttons{margin-top:auto}
.tb-price--sm .tb-price__amount{font-size:clamp(2.6rem,5vw,3.2rem)}
.tb-price--sm .tb-price__badge{left:1.5rem}
.tb-price--main{border:2px solid var(--wp--preset--color--accent);box-shadow:var(--tb-shadow-big)}
.tb-compare td:not(:first-child),.tb-compare th:not(:first-child){text-align:right;white-space:nowrap}
.tb-fine{margin-top:.25rem!important;font-size:.85rem}
.tb-subs td,.tb-subs th{text-align:left!important;white-space:normal!important;vertical-align:top}
.is-layout-constrained>.tb-lead.tb-lead--wide{max-width:1200px!important;margin-left:auto!important;margin-right:auto!important;padding-right:max(0px,calc(100% - 38rem))}
.wp-block-column > .tb-card + .tb-card{margin-top:24px}
.tb-form .tb-typ{border:0;padding:0;margin:0;display:grid;gap:.35rem;min-width:0}
.tb-form .tb-typ legend{padding:0;margin-bottom:.35rem;font-size:.8rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--wp--preset--color--dampad)}
.tb-form .tb-opts{display:flex;flex-wrap:wrap;gap:.5rem}
.tb-form label.tb-opt{display:inline-flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:500;letter-spacing:0;text-transform:none;color:var(--wp--preset--color--text);background:var(--wp--preset--color--bakgrund);border:1px solid var(--wp--preset--color--linje);border-radius:10px;padding:.65rem .9rem;cursor:pointer}
.tb-form label.tb-opt:has(input:checked){border-color:var(--wp--preset--color--accent);background:#fff;box-shadow:0 0 0 1px var(--wp--preset--color--accent)}
.tb-form .tb-opt input{width:auto;margin:0;padding:0;accent-color:var(--wp--preset--color--accent)}
.tb-form .tb-hint{font-size:.85rem;font-weight:400;letter-spacing:0;text-transform:none;color:var(--wp--preset--color--dampad);margin-top:-.15rem}
.tb-form .tb-row{align-items:end}
