/**
 * Starby Meny — Frontend CSS
 * Header, mega-meny, mobilmeny, sök-overlay.
 *
 * @package Starby_Menu
 */

:root {
	--sm-teal: #304E4D;
	--sm-teal-dark: #1E3534;
	--sm-teal-deep: #162928;
	--sm-cream: #F2EDD9;
	--sm-gold: #BEAA76;
	--sm-rust: #B85A3A;
	--sm-white: #FFFFFF;
	--sm-logo-height: 40px;
	--sm-logo-height-scrolled: 32px;
}

/* ========================================
   HEADER
   ======================================== */
.starby-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
	padding: 12px 0; transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorfism med fade nedåt via pseudo-element + mask */
.starby-header::before {
	content: ''; position: absolute; inset: 0;
	background: color-mix(in srgb, var(--sm-teal-deep) 50%, transparent);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	-webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
	mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
	z-index: -1;
	pointer-events: none;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Vid scroll: solid bakgrund, ingen fade */
.starby-header.is-scrolled::before {
	background: color-mix(in srgb, var(--sm-teal-deep) 97%, transparent);
	backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
	-webkit-mask-image: none;
	mask-image: none;
}
.admin-bar .starby-header {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar .starby-header {
		top: 46px;
	}
}
.starby-header.is-scrolled {
	padding: 6px 0;
	box-shadow: 0 1px 0 color-mix(in srgb, var(--sm-gold) 8%, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--sm-cream) 5%, transparent);
}

/* Solid bakgrund när mega-menyn är öppen — döljer innehållet bakom */
.starby-header.has-mega-open::before {
	background: var(--sm-mega-bg, var(--sm-teal-deep, #162928));
	-webkit-mask-image: none;
	mask-image: none;
}
/* Shrink-effekt vid scroll — subtil förminskning */
.starby-header.is-shrunk .starby-header__logo {
	font-size: 22px;
}
.starby-header.is-shrunk .starby-header__logo small {
	font-size: 8px;
}
.starby-header.is-shrunk .starby-header__book-btn {
	padding: 9px 22px;
}

.starby-header .starby-header__inner {
	max-width: var(--sm-max-width, 1400px); margin: 0 auto; padding: 0 24px;
	display: grid; grid-template-columns: auto 1fr auto;
	align-items: center;
	width: 100%; box-sizing: border-box;
	position: relative; z-index: 2;
}

/* Centrera nav i mittkolumnen utan transform */
.starby-header__nav {
	justify-self: center;
}

/* Logo */
.starby-header__logo {
	font-family: var(--sm-font-heading); font-size: 24px;
	color: var(--sm-cream); letter-spacing: 2px; font-weight: 300;
	text-decoration: none; line-height: 1;
	transition: font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.starby-header__logo small {
	display: block; font-family: var(--sm-font-body); font-size: 9px;
	font-weight: 300; letter-spacing: 2px; text-transform: uppercase;
	opacity: 0.4; color: var(--sm-gold);
}
.starby-header__logo-img {
	height: var(--sm-logo-height, 40px); width: auto; display: block;
	max-width: 320px;
	transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* SVG-loggor utan explicit storlek behöver detta för att kunna räkna ut bredd från viewBox */
svg.starby-header__logo-img {
	height: var(--sm-logo-height, 40px);
}
.starby-header.is-scrolled .starby-header__logo-img {
	height: var(--sm-logo-height-scrolled, 32px);
}

/* Nav-länkar */
.starby-header__nav-list {
	display: flex; list-style: none; gap: 28px; margin: 0; padding: 0;
}
.starby-header__nav-item > a {
	font-family: var(--sm-font-body); font-size: var(--sm-nav-font-size, 14px); font-weight: 300;
	color: var(--sm-cream); text-decoration: none;
	padding: 4px 0; position: relative; transition: color 0.3s, font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.starby-header__nav-item > a::after {
	content: ''; position: absolute; bottom: -2px; left: 0;
	width: 0; height: 1px; background: var(--sm-gold); transition: width 0.3s;
}
.starby-header__nav-item > a:hover { color: var(--sm-cream); }
.starby-header__nav-item > a:hover::after { width: 100%; }

/* Osynlig brygga mellan nav-länk och mega-meny — förhindrar att menyn stängs */
.starby-header__nav-item.has-mega {
	position: relative;
}
.starby-header__nav-item.has-mega::after {
	content: '';
	position: absolute;
	top: 100%; left: -24px; right: -24px;
	height: 60px;
	pointer-events: auto;
}

/* Dropdown-indikator */
.starby-header__mega-arrow {
	font-size: 9px;
	color: var(--sm-gold, #BEAA76);
	opacity: 0.4;
	margin-left: 3px;
	transition: opacity 0.3s;
}
.starby-header__nav-item.has-mega:hover .starby-header__mega-arrow { opacity: 0.8; }

/* Höger-grupp */
.starby-header__right { display: flex; align-items: center; gap: 14px; }

/* Sökknapp */
.starby-header__search-btn {
	display: flex; align-items: center; gap: 6px;
	background: color-mix(in srgb, var(--sm-cream) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--sm-cream) 15%, transparent);
	border-radius: 8px; padding: 8px 14px;
	cursor: pointer; transition: all 0.2s; color: color-mix(in srgb, var(--sm-cream) 60%, transparent);
}
.starby-header__search-btn:hover {
	background: color-mix(in srgb, var(--sm-cream) 18%, transparent);
	border-color: color-mix(in srgb, var(--sm-cream) 25%, transparent);
	color: var(--sm-cream);
}
.starby-header__search-btn kbd {
	font-size: 10px; color: color-mix(in srgb, var(--sm-cream) 35%, transparent);
}

/* Boka-knapp */
.starby-header__book-btn {
	background: var(--sm-rust); color: var(--sm-white);
	font-family: var(--sm-font-body); font-size: 12px; font-weight: 500;
	letter-spacing: 2px; text-transform: uppercase;
	padding: 10px 24px; border-radius: 25px;
	text-decoration: none; transition: all 0.3s;
}
.starby-header__book-btn:hover { background: #a04e2e; color: var(--sm-white, #FFFFFF); }

/* Hamburger */
.starby-header__hamburger {
	display: none; flex-direction: column; gap: 5px;
	padding: 8px; background: none; border: none; cursor: pointer;
}
.starby-header__hamburger span {
	width: 24px; height: 2px; background: var(--sm-cream);
	transition: all 0.3s;
}

@media (max-width: 900px) {
	.starby-header__nav, .starby-header__search-btn { display: none; }
	.starby-header__book-btn { font-size: 11px; padding: 8px 16px; }
	.starby-header__hamburger { display: flex; }
	.starby-header .starby-header__inner { display: flex; justify-content: space-between; }
	.starby-header__right { margin-left: auto; }
}

/* ========================================
   MEGA-MENY
   ======================================== */
.starby-mega {
	position: fixed; left: 0; right: 0;
	background: var(--sm-mega-bg, var(--sm-teal-deep, #162928));
	backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
	border-top: 1px solid color-mix(in srgb, var(--sm-gold) 8%, transparent);
	padding: var(--sm-mega-padding, 40px) 0;
	opacity: 0; visibility: hidden;
	transform: translateY(-4px);
	transition: all 0.3s;
	pointer-events: none;
	z-index: 998;
}
.starby-mega.is-open {
	opacity: 1; visibility: visible; transform: translateY(0);
	pointer-events: auto;
}
.starby-mega__inner {
	max-width: var(--sm-max-width, 1400px); margin: 0 auto; padding: 0 24px;
	display: grid; grid-template-columns: 1fr 1fr 1fr 280px; gap: 40px;
	width: 100%; box-sizing: border-box;
}
.starby-mega__col-title {
	font-size: var(--sm-mega-title-size, 18px);
	font-weight: 400;
	color: var(--sm-mega-title-color, var(--sm-cream));
	margin-bottom: 16px;
}
.starby-mega__links { list-style: none; padding: 0; margin: 0; }
.starby-mega__links li { margin-bottom: 10px; }
.starby-mega__links a {
	font-size: var(--sm-mega-link-size, 14px);
	font-weight: 300;
	color: color-mix(in srgb, var(--sm-mega-link-color, var(--sm-cream)) 50%, transparent);
	text-decoration: none; display: flex; align-items: center; gap: 8px;
	transition: color 0.2s;
}
.starby-mega__links a:hover { color: var(--sm-mega-link-hover, var(--sm-gold)); }
.starby-mega__arrow { opacity: 0; transition: all 0.2s; font-size: 12px; margin-left: auto; }
.starby-mega__links a:hover .starby-mega__arrow { opacity: 1; transform: translateX(2px); }
.starby-mega__link-badge {
	display: inline-block;
	background: var(--sm-rust, #B85A3A);
	color: #FFFFFF;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 999px;
	line-height: 1.4;
}

/* Utvalt kort */
.starby-mega__featured {
	background: color-mix(in srgb, var(--sm-cream) 4%, transparent);
	border: 1px solid color-mix(in srgb, var(--sm-gold) 10%, transparent);
	border-radius: 8px; overflow: hidden;
}
.starby-mega__featured-link { text-decoration: none; color: inherit; display: block; }
.starby-mega__featured-img {
	height: 140px; background-size: cover; background-position: center;
	background-color: rgba(48, 78, 77, 0.3);
}
.starby-mega__featured-body { padding: 16px; }
.starby-mega__featured-badge {
	font-size: 9px; font-weight: 700; letter-spacing: 1px;
	text-transform: uppercase; color: #FFFFFF; background: var(--sm-rust);
	margin-bottom: 8px; padding: 4px 10px; border-radius: 999px;
	display: inline-block;
}
.starby-mega__featured-title {
	font-family: var(--sm-font-heading); font-size: 16px; font-weight: 400;
	color: var(--sm-cream); margin-bottom: 4px;
}
.starby-mega__featured-desc { font-size: 12px; color: color-mix(in srgb, var(--sm-cream) 40%, transparent); }

/* ========================================
   MOBILMENY
   ======================================== */
.starby-mobile {
	position: fixed; inset: 0; z-index: 9998;
	background: var(--sm-teal-deep);
	display: flex; flex-direction: column;
	opacity: 0; visibility: hidden;
	transform: translateX(100%);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
}
.starby-mobile.is-open {
	opacity: 1; visibility: visible; transform: translateX(0);
}
.starby-mobile__top {
	display: flex; justify-content: space-between; align-items: center;
	padding: 20px 24px;
}
.starby-mobile__logo {
	font-family: var(--sm-font-heading); font-size: 20px;
	color: var(--sm-cream); letter-spacing: 2px;
	display: flex; align-items: center;
}
.starby-mobile__logo img,
.starby-mobile__logo-img {
	height: 28px; width: auto; display: block; max-width: 220px;
}
.starby-mobile__close {
	background: none; border: none; color: color-mix(in srgb, var(--sm-cream) 60%, transparent);
	font-size: 20px; cursor: pointer; padding: 8px;
}
.starby-mobile__search {
	margin: 0 24px 24px; display: flex; align-items: center; gap: 10px;
	padding: 14px 16px; background: color-mix(in srgb, var(--sm-cream) 6%, transparent);
	border: 1px solid color-mix(in srgb, var(--sm-cream) 10%, transparent); border-radius: 10px;
	color: color-mix(in srgb, var(--sm-cream) 30%, transparent); cursor: pointer;
}
.starby-mobile__nav { flex: 1; padding: 0 24px; }
.starby-mobile__item {
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--sm-gold) 6%, transparent);
}
.starby-mobile__link {
	font-family: var(--sm-font-heading); font-size: 24px;
	color: var(--sm-cream); text-decoration: none;
}
.starby-mobile__chevron {
	background: none; border: none; color: color-mix(in srgb, var(--sm-cream) 20%, transparent);
	font-size: 24px; cursor: pointer; padding: 8px;
}
.starby-mobile__footer {
	padding: 24px; border-top: 1px solid color-mix(in srgb, var(--sm-gold) 6%, transparent); margin-top: auto;
}
.starby-mobile__book-btn {
	display: block; width: 100%; text-align: center;
	background: var(--sm-rust); color: var(--sm-white);
	font-family: var(--sm-font-body); font-size: 13px; font-weight: 600;
	letter-spacing: 2px; text-transform: uppercase;
	padding: 16px; border-radius: 25px; text-decoration: none; margin-bottom: 16px;
}
.starby-mobile__contact {
	text-align: center; font-size: 13px; color: color-mix(in srgb, var(--sm-cream) 35%, transparent);
}
.starby-mobile__contact a { color: var(--sm-gold); text-decoration: none; }

/* Undermeny */
.starby-mobile__submenu {
	position: fixed; inset: 0; z-index: 9999;
	background: var(--sm-teal-deep);
	transform: translateX(100%); transition: transform 0.3s;
	overflow-y: auto;
}
.starby-mobile__submenu.is-open { transform: translateX(0); }
.starby-mobile__sub-header {
	display: flex; align-items: center; gap: 12px;
	padding: 20px 24px; border-bottom: 1px solid color-mix(in srgb, var(--sm-gold) 6%, transparent);
}
.starby-mobile__sub-back {
	background: none; border: none; color: color-mix(in srgb, var(--sm-cream) 50%, transparent);
	font-size: 15px; cursor: pointer; font-family: var(--sm-font-body);
}
.starby-mobile__sub-title {
	font-family: var(--sm-font-heading); font-size: 20px; color: var(--sm-cream);
}
.starby-mobile__sub-links { padding: 24px; }
.starby-mobile__sub-group-title {
	font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
	color: var(--sm-gold); margin: 16px 0 8px; padding-top: 8px;
}
.starby-mobile__sub-group-title:first-child { margin-top: 0; }
.starby-mobile__sub-link {
	display: block; padding: 12px 0; font-size: 16px; font-weight: 300;
	color: color-mix(in srgb, var(--sm-cream) 60%, transparent); text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, var(--sm-gold) 4%, transparent);
}
.starby-mobile__sub-link:hover { color: var(--sm-cream); }

/* ========================================
   SÖK-OVERLAY
   ======================================== */

/*
 * Overlay — djup bakgrund med subtil radiell gradient för rumskänsla.
 * Guld-glöd i mitten skapar ett naturligt fokusdjup mot sökfältet.
 * Öppningsanimation kombinerar fade + minimal scale för att undvika
 * det platta "blink"-intrycket.
 */
.starby-search {
	position: fixed; inset: 0; z-index: 9999;
	background:
		radial-gradient(ellipse 80% 50% at 50% 0%, rgba(190, 170, 118, 0.055) 0%, transparent 65%),
		radial-gradient(ellipse 60% 40% at 50% 100%, rgba(30, 53, 52, 0.6) 0%, transparent 70%),
		color-mix(in srgb, var(--sm-search-bg, #162928) 98%, transparent);
	backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
	opacity: 0; visibility: hidden;
	transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
	color: var(--sm-search-text, var(--sm-cream));
}
.starby-search.is-open {
	opacity: 1; visibility: visible;
}

/* Innehållet glider subtilt upp vid öppning */
.starby-search__inner {
	max-width: 700px; margin: 0 auto; padding: 40px 24px 64px;
	transform: translateY(12px);
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.starby-search.is-open .starby-search__inner {
	transform: translateY(0);
}

/* Stäng-knapp — elegant glas-pille med hover-lift */
.starby-search__close {
	position: absolute; top: 24px; right: 24px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	color: var(--sm-cream);
	font-size: 13px; cursor: pointer; font-family: var(--sm-font-body);
	display: flex; align-items: center; gap: 7px;
	padding: 6px 12px;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
	            transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	letter-spacing: 0.5px;
}
.starby-search__close:hover {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(190, 170, 118, 0.2);
	color: var(--sm-cream);
	transform: translateY(-1px);
}

/* ----------------------------------------
   Sökfält — glasmorfism med gyllene fokus-glow
   ---------------------------------------- */
.starby-search__input-wrap {
	display: flex; align-items: center; gap: 14px;
	background: rgba(255, 255, 255, 0.055) !important;
	border: 1px solid rgba(255, 255, 255, 0.09) !important;
	border-radius: 14px !important; padding: 18px 22px; margin-bottom: 24px;
	transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
	position: relative;
}

/* Subtil inre skugga som ger djup */
.starby-search__input-wrap::before {
	content: '';
	position: absolute; inset: 0; border-radius: 13px;
	background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 60%);
	pointer-events: none;
}

.starby-search__input-wrap:focus-within {
	border-color: rgba(190, 170, 118, 0.35) !important;
	box-shadow: 0 0 0 1px rgba(190, 170, 118, 0.12),
	            0 8px 32px rgba(0, 0, 0, 0.25),
	            inset 0 1px 0 rgba(255, 255, 255, 0.06);
	background: rgba(255, 255, 255, 0.07) !important;
	outline: none;
}

.starby-search__input-wrap svg {
	color: rgba(242, 237, 217, 0.35); flex-shrink: 0;
	transition: color 0.3s ease;
}
.starby-search__input-wrap:focus-within svg {
	color: rgba(190, 170, 118, 0.6);
}

.starby-search__input {
	flex: 1; background: transparent !important; border: none !important;
	font-family: var(--sm-font-body); font-size: var(--sm-search-input-size, 17px);
	color: var(--sm-search-text, var(--sm-cream)) !important;
	outline: none !important; box-shadow: none !important;
	-webkit-appearance: none; letter-spacing: 0.01em;
}
.starby-search__input:focus {
	outline: none !important; box-shadow: none !important;
	background: transparent !important; color: var(--sm-search-text, var(--sm-cream)) !important;
}
.starby-search__input::placeholder {
	color: var(--sm-sand, #A89D88);
	letter-spacing: 0.01em;
}

/* Esc-badge — stilren och diskret */
.starby-search__input-wrap kbd {
	font-size: 11px; color: var(--sm-sand, #A89D88);
	background: rgba(255, 255, 255, 0.04); padding: 4px 9px;
	border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.07);
	font-family: var(--sm-font-body); letter-spacing: 0.5px;
}

/* ----------------------------------------
   Söktaggar (aktiv sökning visas som pill)
   ---------------------------------------- */
.starby-search__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.starby-search__tag {
	font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 20px;
	background: color-mix(in srgb, var(--sm-search-accent, #B85A3A) 12%, transparent);
	color: var(--sm-search-accent, #D4775A);
	letter-spacing: 0.02em;
}

/* ----------------------------------------
   Tom state — rubrik, undertext, populära
   ---------------------------------------- */
.starby-search__empty { text-align: center; padding: 36px 0 12px; }

.starby-search__empty h3 {
	font-family: var(--sm-font-heading); font-size: 26px; font-weight: 300;
	/* Subtil gradient cream → guld ger lyxkänsla utan att vara påflugen */
	background: linear-gradient(135deg, var(--sm-cream) 40%, rgba(190, 170, 118, 0.85) 100%);
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 10px;
	letter-spacing: 0.01em;
}

.starby-search__empty > p {
	font-size: 14px;
	color: var(--sm-sand, #A89D88);
	margin-bottom: 32px;
	letter-spacing: 0.01em;
	line-height: 1.6;
}

/* Populära sökningar — mer luft, finare hover med guld-kantlinje och mjuk bakgrund */
.starby-search__popular {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px;
}

.starby-search__popular-item {
	font-family: var(--sm-font-body); font-size: 13px; font-weight: 400;
	color: var(--sm-cream);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 10px 20px; border-radius: 28px; cursor: pointer;
	transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease,
	            transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.35s ease;
	display: flex; align-items: center; gap: 8px;
	letter-spacing: 0.015em;
}

.starby-search__popular-item:hover {
	background: rgba(190, 170, 118, 0.08);
	color: var(--sm-cream);
	border-color: rgba(190, 170, 118, 0.28);
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 0 0 0 transparent;
}

.starby-search__popular-item:active {
	transform: translateY(0px);
	transition-duration: 0.1s;
}

/* Emoji-ikon i popular-item — lite extra luft */
.starby-search__popular-icon {
	font-size: 15px; line-height: 1; opacity: 0.85;
}

/* ----------------------------------------
   Senaste sökningar — divider och rad-hover
   ---------------------------------------- */
.starby-search__recent-divider {
	display: flex; align-items: center; gap: 16px; margin-bottom: 4px;
}
.starby-search__recent-divider::before,
.starby-search__recent-divider::after {
	content: ''; flex: 1; height: 1px;
	background: linear-gradient(90deg, transparent, rgba(190, 170, 118, 0.08), transparent);
}
.starby-search__recent-divider span {
	font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
	color: var(--sm-sand, #A89D88);
}

.starby-search__recent-item {
	display: flex; align-items: center; gap: 12px;
	width: 100%; padding: 11px 10px;
	color: var(--sm-cream);
	font-family: var(--sm-font-body); font-size: 14px;
	background: none; border: none; cursor: pointer; text-align: left;
	border-radius: 8px;
	transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
	margin: 0 -10px; width: calc(100% + 20px);
}
.starby-search__recent-item:hover {
	background: rgba(255, 255, 255, 0.04);
	color: var(--sm-cream);
	padding-left: 16px;
}
.starby-search__recent-item svg { opacity: 0.25; flex-shrink: 0; }

/* ----------------------------------------
   Resultat-kort — cream-yta med mörk text på den gröna bakgrunden
   ---------------------------------------- */
.starby-search__results {
	background: var(--sm-cream, #F2EDD9);
	color: #1E3534;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(190, 170, 118, 0.25);
}

/* Sektions-rubriker ("Svar", "Källor") på cream */
.starby-search__results .starby-search__answer-header,
.starby-search__results .starby-search__sources-header {
	color: #6B5E3F;
}

/* AI-svarets brödtext */
.starby-search__results .starby-search__answer-text {
	color: #2D2D2D;
}
.starby-search__results .starby-search__answer-text strong {
	color: #1E3534;
}

/* Avgränsare under AI-svaret — mörkare på cream */
.starby-search__results .starby-search__answer {
	border-bottom-color: rgba(30, 53, 52, 0.12);
}

/* Källkort — varmare kort-yta på cream */
.starby-search__results .starby-search__source {
	background: rgba(255, 255, 255, 0.55);
	border-color: rgba(30, 53, 52, 0.08);
}
.starby-search__results .starby-search__source:hover {
	background: rgba(255, 255, 255, 0.85);
	border-color: rgba(184, 90, 58, 0.35);
	box-shadow: 0 6px 20px rgba(30, 53, 52, 0.12);
}
.starby-search__results .starby-search__source-title {
	color: #1E3534;
}
.starby-search__results .starby-search__source-type {
	color: #6B6B6B;
}

/* Primär CTA-källa — rust-knapp ligger redan bra mot cream, men höj kontrasten */
.starby-search__results .starby-search__source--primary {
	background: rgba(184, 90, 58, 0.08);
	border-color: rgba(184, 90, 58, 0.3);
}
.starby-search__results .starby-search__source--primary:hover {
	background: rgba(184, 90, 58, 0.14);
	border-color: rgba(184, 90, 58, 0.5);
}

/* Följdfrågor */
.starby-search__results .starby-search__followups {
	border-top-color: rgba(30, 53, 52, 0.1);
}
.starby-search__results .starby-search__followups-label {
	color: #6B5E3F;
}
.starby-search__results .starby-search__followup-btn {
	color: #1E3534;
	background: rgba(255, 255, 255, 0.5);
	border-color: rgba(30, 53, 52, 0.1);
}
.starby-search__results .starby-search__followup-btn:hover {
	background: rgba(255, 255, 255, 0.85);
	color: #1E3534;
	border-color: rgba(184, 90, 58, 0.35);
}

/* Inline-länkar i AI-svar — rust-färg ligger fint på cream */
.starby-search__results .starby-search__inline-link {
	color: var(--sm-rust, #B85A3A);
}
.starby-search__results .starby-search__inline-link:hover {
	color: #8E4528;
}

/* Mobil */
@media (max-width: 640px) {
	.starby-search__results {
		padding: 22px 18px;
		border-radius: 14px;
	}
}

/* ----------------------------------------
   AI-svar
   ---------------------------------------- */
.starby-search__ai { margin-bottom: 20px; }

.starby-search__answer {
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(190, 170, 118, 0.08);
}
.starby-search__answer-header {
	display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
	font-size: 10px; font-weight: 600; letter-spacing: 2px;
	text-transform: uppercase; color: var(--sm-sand, #A89D88);
}
.starby-search__answer-header svg { opacity: 0.5; }

.starby-search__answer-text {
	font-size: 15px;
	color: var(--sm-search-text, var(--sm-cream));
	line-height: 1.8;
	letter-spacing: 0.01em;
}
.starby-search__answer-text strong {
	color: var(--sm-search-text, var(--sm-cream));
	font-weight: 600;
}

/* Chip inuti svarsrutan (flyttas hit av JS när det finns) */
.starby-search__answer .starby-search__tags {
	margin: 0 0 18px;
}

/* Markdown-rubriker i AI-svaret */
.starby-search__answer-h3,
.starby-search__answer-h4,
.starby-search__answer-h5 {
	font-weight: 400;
	line-height: 1.25;
	margin: 22px 0 10px;
}
.starby-search__answer-h3 { font-size: 22px; }
.starby-search__answer-h4 { font-size: 18px; }
.starby-search__answer-h5 { font-size: 15px; letter-spacing: 0.02em; }
.starby-search__answer-text > .starby-search__answer-h3:first-child,
.starby-search__answer-text > .starby-search__answer-h4:first-child,
.starby-search__answer-text > .starby-search__answer-h5:first-child {
	margin-top: 0;
}
/* På cream-bakgrund ärver rubrikerna mörkare färg */
.starby-search__results .starby-search__answer-h3,
.starby-search__results .starby-search__answer-h4,
.starby-search__results .starby-search__answer-h5 {
	color: #1E3534;
}

.starby-search__inline-link {
	color: rgba(184, 90, 58, 0.9);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
	transition: color 0.3s ease;
}
.starby-search__inline-link:hover { color: var(--sm-gold, #BEAA76); }

/* ----------------------------------------
   Källor — kort med djupare hover-lyft
   ---------------------------------------- */
.starby-search__sources { margin-bottom: 20px; }
.starby-search__sources-header {
	display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
	font-size: 10px; font-weight: 600; letter-spacing: 2px;
	text-transform: uppercase; color: var(--sm-sand, #A89D88);
}
.starby-search__sources-header svg { opacity: 0.5; }

.starby-search__sources-list {
	display: flex; flex-direction: column; gap: 8px;
}

.starby-search__source {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; padding: 14px 18px; border-radius: 12px;
	background: rgba(255, 255, 255, 0.035);
	border: 1px solid rgba(255, 255, 255, 0.055);
	text-decoration: none; color: inherit;
	transition: background 0.35s ease, border-color 0.35s ease,
	            transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.35s ease;
}
.starby-search__source:hover {
	background: rgba(255, 255, 255, 0.065);
	border-color: rgba(184, 90, 58, 0.22);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.starby-search__source-info {
	display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}
.starby-search__source-num {
	width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
	background: rgba(184, 90, 58, 0.14); color: rgba(184, 90, 58, 0.9);
	font-size: 11px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.starby-search__source-title {
	display: block; font-weight: 600; font-size: 14px;
	color: var(--sm-search-text, var(--sm-cream));
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.starby-search__source-type {
	display: block; font-size: 12px;
	color: var(--sm-sand, #A89D88);
	letter-spacing: 0.01em;
}
.starby-search__source-cta {
	display: flex; align-items: center; gap: 4px;
	font-size: 13px; font-weight: 500; white-space: nowrap;
	color: rgba(184, 90, 58, 0.85);
}
.starby-search__source:hover .starby-search__source-cta svg {
	transform: translateX(3px); transition: transform 0.25s ease;
}

/* Primär boknings-CTA */
.starby-search__source--primary {
	background: rgba(184, 90, 58, 0.1);
	border-color: rgba(184, 90, 58, 0.25);
	margin-top: 6px;
}
.starby-search__source--primary:hover {
	background: rgba(184, 90, 58, 0.17);
	border-color: rgba(184, 90, 58, 0.45);
}
.starby-search__source-num--primary {
	background: var(--sm-rust, #B85A3A);
	color: #fff;
}
.starby-search__source-cta--primary {
	background: var(--sm-rust, #B85A3A);
	color: #fff;
	padding: 7px 16px;
	border-radius: 7px;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.02em;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}
.starby-search__source--primary:hover .starby-search__source-cta--primary {
	background: #9e4c30;
	box-shadow: 0 4px 12px rgba(184, 90, 58, 0.35);
}

/* ----------------------------------------
   Följdfrågor
   ---------------------------------------- */
.starby-search__followups {
	margin-top: 20px; padding-top: 20px;
	border-top: 1px solid rgba(190, 170, 118, 0.06);
}
.starby-search__followups-label {
	font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
	color: var(--sm-sand, #A89D88); margin-bottom: 12px; font-family: var(--sm-font-body);
}
.starby-search__followup-btn {
	display: inline-block; font-family: var(--sm-font-body); font-size: 13px;
	color: var(--sm-cream); background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05); padding: 9px 16px;
	border-radius: 9px; margin-right: 8px; margin-bottom: 8px; cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
	            transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	letter-spacing: 0.01em;
}
.starby-search__followup-btn:hover {
	background: rgba(190, 170, 118, 0.07);
	color: var(--sm-cream);
	border-color: rgba(190, 170, 118, 0.2);
	transform: translateY(-1px);
}

/* ----------------------------------------
   Loading / Thinking — organisk shimmer med guld-nyans
   ---------------------------------------- */
.starby-search__loading { padding: 48px 0; }

.starby-search__thinking {
	display: flex; align-items: center; gap: 14px;
	margin-bottom: 28px;
}

.starby-search__thinking-label {
	font-size: 13px; font-family: var(--sm-font-body);
	color: rgba(242, 237, 217, 0.4); letter-spacing: 0.5px;
}

/* Tre pulserande prickar — organiska och mjuka */
.starby-search__thinking-dots {
	display: flex; gap: 5px;
}
.starby-search__thinking-dots span {
	width: 7px; height: 7px; border-radius: 50%;
	background: rgba(190, 170, 118, 0.5);
	animation: starbyThinkDot 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.starby-search__thinking-dots span:nth-child(2) { animation-delay: 0.22s; }
.starby-search__thinking-dots span:nth-child(3) { animation-delay: 0.44s; }

@keyframes starbyThinkDot {
	0%, 80%, 100% { opacity: 0.18; transform: scale(0.75); }
	40% { opacity: 0.9; transform: scale(1.1); }
}

/* Skeleton-linjer med guld-shimmer */
.starby-search__thinking-bars {
	display: flex; flex-direction: column; gap: 12px;
}
.starby-search__thinking-bar {
	height: 11px; border-radius: 6px;
	background: linear-gradient(90deg,
		rgba(242, 237, 217, 0.03) 0%,
		rgba(190, 170, 118, 0.09) 40%,
		rgba(242, 237, 217, 0.05) 60%,
		rgba(242, 237, 217, 0.03) 100%
	);
	background-size: 300% 100%;
	animation: starbyThinkShimmer 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.starby-search__thinking-bar:nth-child(1) { width: 82%; }
.starby-search__thinking-bar:nth-child(2) { width: 67%; animation-delay: 0.3s; }
.starby-search__thinking-bar:nth-child(3) { width: 50%; animation-delay: 0.6s; }

@keyframes starbyThinkShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ----------------------------------------
   Tagg-animation
   ---------------------------------------- */
.starby-search__tag--animate {
	animation: starbyTagPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.starby-search__tag--animate:nth-child(2) { animation-delay: 0.08s; }
.starby-search__tag--animate:nth-child(3) { animation-delay: 0.16s; }
.starby-search__tag--animate:nth-child(4) { animation-delay: 0.24s; }

@keyframes starbyTagPop {
	0% { opacity: 0; transform: scale(0.85) translateY(6px); }
	100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ----------------------------------------
   Mobil — justerade marginaler och tätare spacing
   ---------------------------------------- */
@media (max-width: 640px) {
	.starby-search__inner { padding: 28px 16px 48px; }
	.starby-search__empty h3 { font-size: 21px; }
	.starby-search__popular { gap: 8px; }
	.starby-search__popular-item { font-size: 12px; padding: 9px 16px; }
	.starby-search__close { top: 16px; right: 16px; }
	.starby-search__input-wrap { padding: 15px 16px; border-radius: 12px !important; }
}

/* Respektera reduced motion — alla animationer inaktiveras mjukt */
@media (prefers-reduced-motion: reduce) {
	.starby-search,
	.starby-search__inner,
	.starby-search__close,
	.starby-search__input-wrap,
	.starby-search__popular-item,
	.starby-search__source,
	.starby-search__followup-btn,
	.starby-search__recent-item {
		transition-duration: 0.01s !important;
		animation: none !important;
		transform: none !important;
	}
	.starby-search__thinking-dots span { animation: none !important; opacity: 0.5 !important; }
	.starby-search__thinking-bar { animation: none !important; }
}

/* ========================================
   SCROLL REVEALS
   Anvand klasserna i BB:s Advanced > Class.
   ======================================== */

/* Fade up — element glider upp och fadar in */
.sr-fade-up {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 1.4s ease,
	            transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.sr-fade-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Mask reveal — text avslojas underfran med mjuk fade */
.sr-mask {
	overflow: hidden;
}
.sr-mask > * {
	opacity: 0;
	transform: translateY(16px);
	transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
	            opacity 1.8s ease;
}
.sr-mask.is-visible > * {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger-delays satts via JS for att fungera oavsett DOM-struktur */

/* Scale in — element zoomar in subtilt */
.sr-scale {
	opacity: 0;
	transform: scale(0.92);
	transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.sr-scale.is-visible {
	opacity: 1;
	transform: scale(1);
}

/* Linje ritas ut horisontellt */
.sr-line {
	width: 0;
	height: 1px;
	background: var(--sm-gold, #BEAA76);
	transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.sr-line.is-visible {
	width: 100%;
}

/* Linje ritas ut vertikalt */
.sr-line-v {
	width: 1px; height: 0;
	background: linear-gradient(180deg, var(--sm-gold, #BEAA76), transparent);
	transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.sr-line-v.is-visible {
	height: 80px;
}

/* Parallax — diskret scroll-baserad rorelse pa bilder.
   Lagg sr-parallax pa en wrapper, bilden inuti ror sig sakta.
   Wrapper behover overflow:hidden + isolate sa border-radius funkar. */
/* Avaktivera reveals i BB-editorn — allt synligt direkt */
.fl-builder-edit .sr-fade-up,
.fl-builder-edit .sr-mask > *,
.fl-builder-edit .sr-scale {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}
.fl-builder-edit .sr-line { width: 100% !important; transition: none !important; }
.fl-builder-edit .sr-line-v { height: 80px !important; transition: none !important; }

/* Respektera reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sr-fade-up, .sr-mask > *, .sr-scale, .sr-line, .sr-line-v {
		transition-duration: 0.01s !important;
		transform: none !important;
		opacity: 1 !important;
	}
	.sr-line { width: 100% !important; }
	.sr-line-v { height: 80px !important; }
}
