/*
Theme Name: InTime
Theme URI: https://www.intime.nu
Author: Inspot
Description: Blocktema för InTime (TellusTalk-gruppen). Ombyggnad av intime.nu i WordPress FSE.
Version: 0.5.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: intime
*/

/* Inloggningsmenyn i verktygsraden */
.intime-login summary { list-style: none; cursor: pointer; background: var(--wp--preset--color--primary); color: #fff; padding: .35rem .9rem; font-size: .8rem; text-transform: uppercase; }
.intime-login summary::-webkit-details-marker { display: none; }
.intime-login { position: relative; }
.intime-login[open] > :not(summary) { position: absolute; right: 0; z-index: 50; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); padding: .5rem 1rem; min-width: 12rem; }


/* Pratbubbla (blockstil på Grupp) */
.is-style-speech-bubble { position: relative; background: rgba(52,56,64,.8); color: #fff; border-radius: 10px; padding: 30px; margin-bottom: 20px; }
.is-style-speech-bubble::after { content: ""; position: absolute; bottom: -20px; left: 40px; border-width: 20px 20px 0; border-style: solid; border-color: rgba(52,56,64,.8) transparent; }
.is-style-speech-bubble :where(h1,h2,h3,h4,a) { color: #fff; }

/* Ingress (blockstil på Stycke) */
.is-style-lead { font-size: 1.25rem; font-weight: 700; }

/* Testkonto-kortet */
.intime-testkonto { box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12); }

/* Bildspel på startsidan: grupp med klassen intime-slider och Omslag-block i */
.intime-slider { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; gap: 0 !important; }
.intime-slider > * { flex: 0 0 100%; scroll-snap-align: start; margin: 0 !important; }
.intime-hero { position: relative; }
@media (min-width: 900px) {
	.intime-hero > .intime-testkonto { position: absolute; right: max(20px, calc((100% - var(--wp--style--global--content-size)) / 2)); bottom: 30px; z-index: 2; }
}

/* Kundlogotyper */
.intime-logos img { max-height: 90px; width: auto; object-fit: contain; }

/* Sidfot och listor utan punkter */
.intime-footer h3 a { color: var(--wp--preset--color--primary) !important; text-decoration: none; }
.intime-plain-list, .intime-login ul { list-style: none; }
.intime-footer a { text-decoration: none; }
.intime-testkonto .wp-block-button { flex: 1; }
.intime-testkonto .wp-block-button__link { width: 100%; }

/* Gravity Forms: knappen som temats knappar */
.gform_wrapper .gform_footer .gform_button { background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 0; padding: .6rem 1.6rem; font-size: 1.2rem; cursor: pointer; }
.gform_wrapper .gform_footer .gform_button:hover { background: var(--wp--preset--color--primary-dark); }

/* --- Avstämt mot live 2026-10-23 --- */
/* Sök: rosa förstoringsglas utan platta, centrerat mot menyn (som live) */
.intime-header .wp-block-search { display: flex; align-items: center; }
.intime-header .wp-block-search__inside-wrapper { align-items: center; padding: 0; border: 0; }
.intime-header .wp-block-search__button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; padding: 0; background: none !important; color: var(--wp--preset--color--primary) !important; border: 0; border-radius: 50%; transition: background-color .15s; }
.intime-header .wp-block-search__button:hover, .intime-header .wp-block-search__button:focus-visible { background: rgba(255,255,255,.08) !important; }
.intime-header .wp-block-search__button svg { fill: currentColor; width: 22px; height: 22px; min-width: 0; min-height: 0; }

/* Det utfällda sökfältet i samma stil som det mörka sidhuvudet */
.intime-header .wp-block-search__input { height: 32px; padding: 0 .9rem; font-size: .875rem; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; }
.intime-header .wp-block-search__input::placeholder { color: rgba(255,255,255,.6); }
.intime-header .wp-block-search__input:focus { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; border-color: transparent; }
.intime-header .wp-block-search.wp-block-search__searchfield-hidden .wp-block-search__input { padding: 0; border-width: 0; }

/* Inget mellanrum mellan sidhuvud, toppbild/bildspel och sidfot */
.wp-site-blocks > * + * { margin-block-start: 0; }
.intime-login summary { font-size: 12px; padding: 6px 12px; }

/* Pratbubblan i bildspelet: centrerad text, 40 px från toppen i linje med innehållets vänsterkant (som live) */
.is-style-speech-bubble { text-align: center; max-width: 420px; padding: 15px; }
.intime-slider .wp-block-cover { padding: 56px max(20px, calc((100% - var(--wp--style--global--content-size)) / 2)) 40px !important; }
.intime-slider .wp-block-cover__inner-container > .is-style-speech-bubble { margin-left: 0 !important; margin-top: 0; }

/* Testkontokortet är lätt genomskinligt som live */
.intime-testkonto.has-white-background-color { background-color: rgba(255,255,255,.9) !important; }

/* Startsidans bildspel ligger direkt mot första sektionen */
.intime-hero + * { margin-block-start: 0 !important; }

/* Citat som vita kort med rosa citattecken, namnraden avskild under en tunn linje */
.wp-block-quote { position: relative; box-shadow: 0 1px 2px rgba(39,47,67,.06), 0 6px 20px rgba(39,47,67,.07); border: 1px solid #ececec !important; }
.wp-block-quote::before { content: "“"; position: absolute; top: .35rem; left: 1.25rem; font: 700 3.5rem/1 var(--wp--preset--font-family--raleway); color: var(--wp--preset--color--primary); }
.wp-block-quote p { margin: 0; }
.wp-block-quote cite { display: block; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #eee; font-style: normal; font-size: .8rem; line-height: 1.4; color: #6b6f78; }
.has-light-background-color .wp-block-quote { border-color: transparent !important; }
/* Lika höga kort när citaten står i kolumner */
.wp-block-column > .wp-block-quote:only-child { height: 100%; display: flex; flex-direction: column; }
.wp-block-column > .wp-block-quote:only-child cite { margin-top: auto; }
.wp-block-column > .wp-block-quote:only-child p { margin-bottom: 1rem; }

/* Ikonblock: mörkgrå rubrik och text */
.intime-teaser { font-size: var(--wp--preset--font-size--x-large) !important; color: #444; }
.intime-teaser ~ p { color: #444; }

/* Ingress */
.is-style-lead { font-size: 1.5rem; color: #141823; }

/* Sidfot: vita etikettrubriker, dämpade länkar, tunn rosa accentlinje överst och en bottenrad */
.intime-footer { font-size: .95rem; border-top: 4px solid var(--wp--preset--color--primary); }
.intime-footer .has-small-font-size { font-size: .95rem !important; }
.intime-footer h3 { font-size: .8rem !important; font-weight: 700; font-family: var(--wp--preset--font-family--open-sans); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.intime-footer h3 a { color: #fff !important; }
.intime-footer h3 a:hover { text-decoration: none; opacity: .8; }
.intime-footer .wp-block-column > p { margin-block: 0 .6rem; }
.intime-footer .intime-plain-list { margin-top: 0; }
.intime-footer .intime-plain-list li { margin-bottom: .45rem; }
.intime-footer a { color: rgba(255,255,255,.72) !important; text-decoration: none; transition: color .15s; }
.intime-footer a:hover, .intime-footer a:focus-visible { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
.intime-footer .wp-block-column:first-child strong { display: block; font-size: 1rem; margin-bottom: .25rem; }
.intime-footer-logo { margin-bottom: 1.25rem; }
.intime-footer .wp-block-columns .wp-block-columns { row-gap: 2.5rem; }
.intime-footer-bottom { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: rgba(255,255,255,.55); }
.intime-footer-bottom p { margin: 0; }
.intime-footer-bottom a { color: rgba(255,255,255,.65) !important; }

/* Brödsmulor */
.wp-block-breadcrumbs a { color: var(--wp--preset--color--body-text); text-decoration: none; }
.wp-block-breadcrumbs [aria-current] { color: var(--wp--preset--color--dark); font-style: italic; }

/* Bildspelets pilar och prickar (skapas av slider.js) */
.intime-slider-nav { position: absolute; inset: 0; pointer-events: none; }
.intime-slider-nav button { pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; padding: .5rem 1rem; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.intime-slider-nav .prev { left: 0; }
.intime-slider-nav .next { right: 0; }
.intime-slider-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; pointer-events: auto; }
.intime-slider-dots button { position: static; transform: none; width: 10px; height: 10px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.6); font-size: 0; }
.intime-slider-dots button[aria-current="true"] { background: #fff; }


/* Rubrik och ingress direkt under brödsmulorna, som live */
.intime-article-header { gap: 0; }
.intime-article-header h1 { margin-block: 0 .25rem; }

/* Startsidan: rubrikerna är 24 px på live */
.home .wp-block-post-content h2:not(.is-style-speech-bubble h2) { font-size: 1.5rem; }
.intime-hero h2 { font-size: var(--wp--preset--font-size--x-large); }

/* Kundlogotyper centrerade i sina kolumner */
.intime-logos .wp-block-image { display: flex; justify-content: center; align-items: center; height: 100%; }

/* --- Mobil, som live (under 600 px, där menyn blir en hamburgare) --- */
@media (max-width: 599px) {
	header.wp-block-template-part { position: relative; }
	.intime-toolbar .wp-block-group { justify-content: flex-start; }
	/* Hamburgaren uppe till höger i den vita raden, rosa */
	.intime-header, .intime-header .wp-block-navigation { position: static; }
	.intime-header .wp-block-navigation__responsive-container-open { position: absolute; top: .5rem; right: 20px; color: var(--wp--preset--color--primary); }
	.intime-header .wp-block-navigation__responsive-container-open svg { width: 36px; height: 36px; }
	/* Stor centrerad logga, sökningen nås via sidan /?s= och menyn */
	.intime-header > .wp-block-group { justify-content: center; }
	.intime-header .wp-block-site-logo img { width: 210px !important; }
	.intime-header .wp-block-search { display: none; }
	/* Testkontokortet ovanför toppbilden: bara text och knapp */
	.wp-block-cover:has(.intime-testkonto) { min-height: 0 !important; padding: 20px 0 230px !important; align-items: flex-start; background: #fff; }
	.wp-block-cover:has(.intime-testkonto) .wp-block-cover__image-background { top: auto; height: 210px; }
	.wp-block-cover .intime-testkonto { flex-basis: 100% !important; }
	.intime-testkonto .wp-block-column:first-child { display: none; }
	.intime-testkonto p { text-align: center; }
	/* Startsidan: kortet före bildspelet, bildspelet utan textbubbla (som live) */
	.intime-hero { display: flex; flex-direction: column; }
	.intime-hero > .intime-testkonto { order: -1; margin: 20px; flex-basis: auto !important; }
	.intime-slider .is-style-speech-bubble { display: none; }
}

/* Innehållsbredd som live: 1140 px, 1400 px från 1440 px skärmbredd */
@media (min-width: 1440px) {
	body { --wp--style--global--content-size: 1400px; }
}

/* Sidfotens menyer två i bredd på mobil i stället för en lång kolumn */
@media (max-width: 781px) {
	.intime-footer .wp-block-column .wp-block-columns { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
	.intime-footer .wp-block-column .wp-block-columns + .wp-block-columns { margin-top: 1.75rem; }
}

/* Konturknapp (t.ex. "Fler referenser" i citatsektionen) */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--primary); border: 2px solid var(--wp--preset--color--primary); padding: calc(.6rem - 2px) calc(1.6rem - 2px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible { background: var(--wp--preset--color--primary); color: #fff; }
.wp-block-columns + .wp-block-buttons { margin-top: 2.5rem; }

/* --- Huvudmenyn som live (desktop): vit text, mörkrosa linje under aktiv/hovrad punkt,
   undermenyn i mörkrosa över hela menyns bredd med pil till höger, fälls ner vid hovring/fokus --- */
@media (min-width: 600px) {
	.intime-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container { position: relative; gap: 0; }
	.intime-header .wp-block-navigation__container > .wp-block-navigation-item { position: static; }
	.intime-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { padding: 10px 20px; color: #fff; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow .15s; }
	.intime-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
	.intime-header .wp-block-navigation__container > .wp-block-navigation-item:focus-within > .wp-block-navigation-item__content,
	.intime-header .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
	.intime-header .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content { box-shadow: inset 0 -3px 0 var(--wp--preset--color--primary-dark); color: #fff; }
	.intime-header .wp-block-navigation__submenu-icon { display: none; }

	.intime-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
		left: 0 !important; right: 0; top: 100%; width: auto !important; min-width: 0 !important;
		padding: .5rem 2rem; border: 0 !important; background: var(--wp--preset--color--primary-dark) !important; color: #fff !important;
		text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 1rem;
		transform-origin: top; transform: perspective(400px) rotateX(-90deg); transition: transform .3s ease, opacity .1s linear, visibility 0s linear .3s;
	}
	.intime-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
	.intime-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container { transform: none; transition: transform .3s ease, opacity .1s linear, visibility 0s; }
	.intime-header .wp-block-navigation__submenu-container .wp-block-navigation-item { width: 100%; margin-block: 5px; }
	.intime-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { position: relative; display: block; width: 100%; padding: 5px 36px 5px 5px !important; color: #fff; transition: background-color .15s; }
	.intime-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { content: ""; position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-50%) rotate(-45deg); }
	.intime-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { text-decoration: none; }
	.intime-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
}
@media (prefers-reduced-motion: reduce) {
	.intime-header .wp-block-navigation .has-child > .wp-block-navigation__submenu-container { transition: none !important; transform: none !important; }
}

/* ===== Startsidan (migration/startsida.html) ===== */
/* 1. Bildspel med text till vänster på mörk toning, två knappar och tre bockar */
.intime-hero-slide { color: #fff; }
.intime-hero-slide .wp-block-cover__background { opacity: 1 !important; background: linear-gradient(90deg, rgba(37,40,47,.94) 0%, rgba(37,40,47,.82) 40%, rgba(37,40,47,.2) 75%, rgba(37,40,47,0) 100%) !important; }
.intime-slider .wp-block-cover__inner-container > .intime-hero-text { margin-left: 0 !important; max-width: 560px; }
.intime-hero-slide h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem) !important; line-height: 1.15; margin: 0 0 .75rem; }
.intime-hero-lead { font-size: 1.2rem; color: rgba(255,255,255,.88); margin: 0; }
.intime-hero-slide .wp-block-buttons { margin-top: 1.75rem; gap: .75rem; }
.intime-hero-slide .is-style-outline > .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.75); }
.intime-hero-slide .is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--dark); border-color: #fff; }
.intime-checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .95rem; color: rgba(255,255,255,.88); }
.intime-checks li { display: flex; align-items: baseline; gap: .4rem; }
.intime-checks li::before { content: "✓"; color: var(--wp--preset--color--primary); font-weight: 800; }

/* 2. Logoband direkt under bildspelet */
.intime-logo-band { margin-block-start: 0 !important; padding-block: 28px; border-bottom: 1px solid #e6e6e8; }
.intime-logo-band + * { margin-block-start: 0 !important; }
.intime-logo-band .wp-block-image { margin: 0; }
.intime-logo-band img { height: 34px; width: auto; filter: grayscale(1); opacity: .65; transition: filter .2s, opacity .2s; }
.intime-logo-band img:hover { filter: none; opacity: 1; }

/* 3. Tjänsterna i samma stil som ikonblocken på undersidorna */
.intime-services .intime-teaser { font-size: 1.375rem !important; margin-top: .75rem; }
.intime-services > .wp-block-columns { margin-top: 2.5rem; }
.intime-more a { font-weight: 700; text-decoration: none; }
.intime-more a::after { content: " →"; }
.intime-more a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 8. Avslutande rådgivningsband i rosa */
body.home .wp-block-post-content { padding-bottom: 0 !important; }
body.home .intime-footer { border-top: 0; }
.intime-cta-band { position: relative; overflow: hidden; padding-block: 72px; color: #fff;
	background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 40%), radial-gradient(circle at 5% 120%, rgba(0,0,0,.2) 0, rgba(0,0,0,0) 45%), linear-gradient(120deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-dark)); }
.intime-cta-band::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 300px; height: 300px; background: #fff; opacity: .08; -webkit-mask: url(assets/icons/comment-sms.svg) center/contain no-repeat; mask: url(assets/icons/comment-sms.svg) center/contain no-repeat; pointer-events: none; }
.intime-cta-band > * { position: relative; z-index: 1; }
.intime-cta-band h2 { font-size: 2rem !important; margin: 0 0 .5rem; }
.intime-cta-band p { font-size: 1.1rem; color: rgba(255,255,255,.9); margin: 0; }
.intime-cta-band .wp-block-buttons { gap: .75rem; }
.intime-btn-white > .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary); }
.intime-btn-white > .wp-block-button__link:hover { background: rgba(255,255,255,.88); color: var(--wp--preset--color--primary-dark); }
.intime-cta-band .is-style-outline > .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.8); }
.intime-cta-band .is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--primary); }

@media (max-width: 781px) {
	.intime-cta-band .wp-block-buttons { justify-content: flex-start !important; }
}
@media (max-width: 599px) {
	.intime-hero-slide .wp-block-cover__background { background: rgba(37,40,47,.78) !important; }
	.intime-hero-slide { min-height: 480px !important; }
	.intime-slider-nav .prev, .intime-slider-nav .next { display: none; }
	.intime-hero-slide h2 { font-size: 1.9rem !important; }
	.intime-logo-band img { height: 24px; }
}
