/* inModern: innlogging og Min konto. WooCommerce sin egen kontovisning (skjemaer, tabeller, endepunkt) i designets ramme.
 * Farger kommer fra tokene (--ink, --page, --tile, --line), så mørk modus følger uten egne regler. */

body.ipl-design-inmodern .im-acct { padding-top: 24px; }
body.ipl-design-inmodern .im-acct__in { width: min(100% - 32px, 1240px); margin: 0 auto; padding: 8px 0 64px; }
body.ipl-design-inmodern .im-acct .woocommerce { margin: 0; padding: 0; }
body.ipl-design-inmodern .im-acct .woocommerce > h2 { display: none; }

/* meldinger fra WooCommerce */
body.ipl-design-inmodern .im-acct :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; padding: 14px 16px; border: 0; border-radius: 12px; background: var(--tile); color: var(--ink); font-size: 14.5px; line-height: 1.5; list-style: none; }
body.ipl-design-inmodern .im-acct :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before { display: none; }
body.ipl-design-inmodern .im-acct .woocommerce-error { background: #fff1f0; color: #b42318; }
body.ipl-design-inmodern .im-acct .woocommerce-error li { margin: 0; padding: 0; }
body.ipl-design-inmodern .im-acct .woocommerce-error a, body.ipl-design-inmodern .im-acct .woocommerce-info a:not(.button), body.ipl-design-inmodern .im-acct .woocommerce-message a:not(.button) { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* skjemaer: samme språk som kontaktskjemaet */
body.ipl-design-inmodern .im-acct form :is(.form-row, .woocommerce-form-row) { margin: 0; padding: 0; width: 100%; float: none; }
body.ipl-design-inmodern .im-acct form label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
body.ipl-design-inmodern .im-acct form .required { color: var(--ink-2); text-decoration: none; }
body.ipl-design-inmodern .im-acct form :is(input.input-text, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea) { width: 100%; min-width: 0; height: 50px; margin: 0; padding: 0 14px; border: 1px solid #d3d5d9; border-radius: 10px; background: var(--page); color: var(--ink); font: inherit; font-size: 16px; box-shadow: none; }
body.ipl-design-inmodern .im-acct form textarea { height: auto; padding: 12px 14px; }
body.ipl-design-inmodern .im-acct form :is(input, select, textarea):focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 3px rgba(14,15,17,.08); }
body.ipl-design-inmodern .im-acct form .password-input { display: block; position: relative; }
body.ipl-design-inmodern .im-acct form .password-input input { padding-right: 48px; }
body.ipl-design-inmodern .im-acct form .show-password-input { position: absolute; top: 0; right: 0; width: 48px; height: 50px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
body.ipl-design-inmodern .im-acct form .show-password-input::after { background-color: currentColor; }
body.ipl-design-inmodern .im-acct form .woocommerce-form-login__rememberme { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 400; cursor: pointer; }
body.ipl-design-inmodern .im-acct form input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

/* utlogget: samme scene som Kontakt oss (bilde med overskrift, kortet med skjemaet til høyre) */
body.ipl-design-inmodern .im-acct--out { padding-top: 0; }
body.ipl-design-inmodern .im-acct--out .im-ct3__stage { min-height: 0; }
body.ipl-design-inmodern .im-acct__card .woocommerce { max-width: none; }
body.ipl-design-inmodern .im-acct__card form.login, body.ipl-design-inmodern .im-acct__card form.lost_reset_password, body.ipl-design-inmodern .im-acct__card form.woocommerce-ResetPassword { display: grid; gap: 18px; margin: 0; padding: 0; border: 0; background: none; }
body.ipl-design-inmodern .im-acct__card form :is(input.input-text, input[type="text"], input[type="email"], input[type="password"], input[type="tel"]) { height: 54px; }
body.ipl-design-inmodern .im-acct__card form label { font-size: 14px; }
body.ipl-design-inmodern .im-acct__card form .show-password-input { height: 54px; }
/* innlogging: «Husk meg» og «Mistet passordet ditt?» på én rad, knappen under */
body.ipl-design-inmodern .im-acct__card form.login { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
body.ipl-design-inmodern .im-acct__card form.login > .form-row:not(:has(.woocommerce-form-login__submit)) { grid-column: 1 / -1; }
body.ipl-design-inmodern .im-acct__card form.login > .form-row:has(.woocommerce-form-login__submit) { display: contents; }
body.ipl-design-inmodern .im-acct__card form.login .woocommerce-form-login__rememberme { grid-column: 1; grid-row: 3; }
body.ipl-design-inmodern .im-acct__card form.login .woocommerce-LostPassword { grid-column: 2; grid-row: 3; margin: 0; font-size: 14px; white-space: nowrap; }
body.ipl-design-inmodern .im-acct__card form.login .woocommerce-form-login__submit { grid-column: 1 / -1; grid-row: 4; margin-top: 4px; }
body.ipl-design-inmodern .im-acct__card .woocommerce-LostPassword a, body.ipl-design-inmodern .im-acct__help a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
body.ipl-design-inmodern .im-acct__card > .woocommerce > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info), body.ipl-design-inmodern .im-acct__card .woocommerce-notices-wrapper > * { margin-bottom: 18px; }
body.ipl-design-inmodern .im-acct__help { max-width: none; margin: 18px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* knapper */
body.ipl-design-inmodern .im-acct :is(.button, button.button, input.button, a.button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-height: 0; padding: 0 18px; border: 0; border-radius: 8px; background: var(--ink); color: var(--page); font: inherit; font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; box-shadow: none; cursor: pointer; transition: opacity .2s ease; }
body.ipl-design-inmodern .im-acct :is(.button, a.button):hover { opacity: .86; color: var(--page); }
body.ipl-design-inmodern .im-acct :is(.woocommerce-form-login__submit, .woocommerce-Button.button[name="save_account_details"], .woocommerce-form-register__submit) { width: 100%; height: 52px; }
body.ipl-design-inmodern .im-acct__card :is(.woocommerce-form-login__submit, form.lost_reset_password .button) { height: 56px; justify-content: space-between; padding: 0 20px; font-size: 15px; }
body.ipl-design-inmodern .im-acct__card :is(.woocommerce-form-login__submit, form.lost_reset_password .button)::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }

/* innlogget: meny til venstre, innhold til høyre */
body.ipl-design-inmodern .im-acct .ct-woo-account { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
body.ipl-design-inmodern .im-acct :is(.ct-acount-nav, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-navigation ul) { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.ipl-design-inmodern .im-acct .ct-account-welcome { display: none; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border: 0; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--page); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation a::before { display: none; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation .is-active a { border-color: var(--ink); background: var(--ink); color: var(--page); }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-content { min-width: 0; margin: 0; padding: 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-content > p { margin: 0 0 14px; max-width: 64ch; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-content a:not(.button) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-content :is(h2, h3) { margin: 0 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; color: var(--ink); }
@media (min-width: 960px) {
	body.ipl-design-inmodern .im-acct { padding-top: 32px; }
	body.ipl-design-inmodern .im-acct__in { padding-bottom: 96px; }
	body.ipl-design-inmodern .im-acct .ct-woo-account { grid-template-columns: 240px 1fr; gap: 48px; }
	body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation ul { display: grid; gap: 4px; }
	body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation a { height: 44px; border-color: transparent; background: none; border-radius: 10px; }
	body.ipl-design-inmodern .im-acct .woocommerce-MyAccount-navigation li:not(.is-active) a:hover { background: var(--tile); }
}

/* tabeller (ordrer, ordredetaljer) */
body.ipl-design-inmodern .im-acct table.shop_table { width: 100%; margin: 0 0 24px; border: 0; border-collapse: collapse; background: none; font-size: 14.5px; }
body.ipl-design-inmodern .im-acct table.shop_table :is(th, td) { padding: 14px 12px 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; vertical-align: middle; }
body.ipl-design-inmodern .im-acct table.shop_table thead th { padding-top: 0; font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
body.ipl-design-inmodern .im-acct table.shop_table tfoot th { font-weight: 500; }
body.ipl-design-inmodern .im-acct table.shop_table a:not(.button) { color: var(--ink); }
body.ipl-design-inmodern .im-acct table.shop_table .button { height: 36px; padding: 0 14px; font-size: 13px; }
@media (max-width: 719px) {
	body.ipl-design-inmodern .im-acct table.shop_table_responsive thead { display: none; }
	body.ipl-design-inmodern .im-acct table.shop_table_responsive tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
	body.ipl-design-inmodern .im-acct table.shop_table_responsive td { display: block; padding: 6px 0; border: 0; text-align: right; }
	body.ipl-design-inmodern .im-acct table.shop_table_responsive td::before { content: attr(data-title); float: left; font-size: 12px; font-weight: 500; line-height: 1.9; color: var(--ink-2); text-align: left; }
	body.ipl-design-inmodern .im-acct table.shop_table_responsive td::after { content: ""; display: block; clear: both; }
}

/* adresser og kontodetaljer */
body.ipl-design-inmodern .im-acct .woocommerce-Addresses { display: grid; gap: 16px; }
body.ipl-design-inmodern .im-acct .woocommerce-Address { float: none; width: auto; padding: 20px; border-radius: 14px; background: var(--tile); }
body.ipl-design-inmodern .im-acct .woocommerce-Address address { font-style: normal; }
body.ipl-design-inmodern .im-acct .woocommerce-Address-title { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
body.ipl-design-inmodern .im-acct .woocommerce-Address-title h2 { margin: 0; font-size: 18px; }
body.ipl-design-inmodern .im-acct .woocommerce-EditAccountForm, body.ipl-design-inmodern .im-acct .woocommerce-address-fields__field-wrapper { display: grid; gap: 16px; max-width: 560px; }
body.ipl-design-inmodern .im-acct .woocommerce-EditAccountForm fieldset { display: grid; gap: 16px; margin: 8px 0 0; padding: 0; border: 0; }
body.ipl-design-inmodern .im-acct .woocommerce-EditAccountForm legend { margin: 0 0 8px; padding: 0; font-size: 16px; font-weight: 600; }
body.ipl-design-inmodern .im-acct em, body.ipl-design-inmodern .im-acct .description { font-size: 13px; color: var(--ink-2); }
@media (min-width: 720px) { body.ipl-design-inmodern .im-acct .woocommerce-Addresses { grid-template-columns: 1fr 1fr; } }
body.ipl-design-inmodern .im-acct--out .im-ct3__lead { margin-top: 18px; }
body.ipl-design-inmodern .im-acct__card form.login .woocommerce-form-login__submit { height: 56px; }

/* utlogget: headeren ligger over bildekortet (glass over bildet), som på forsiden og Om oss */
body.ipl-design-inmodern.im-page-konto:not(.logged-in) #header { position: absolute; inset: 0 0 auto; z-index: 4; }
body.ipl-design-inmodern.im-page-konto:not(.logged-in) .im-hdr { background: transparent; padding: 26px 24px 12px; }
body.ipl-design-inmodern.im-page-konto:not(.logged-in) .im-hdr__nav { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.26); }
body.ipl-design-inmodern .im-acct--over { padding: 0; }
body.ipl-design-inmodern .im-acct--over .im-ct3__stage { width: auto; margin: 8px; min-height: 0; border-radius: 14px; }
body.ipl-design-inmodern .im-acct--over .im-ct3__stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(8,9,11,.55) 0%, rgba(8,9,11,0) 26%); pointer-events: none; }
body.ipl-design-inmodern .im-acct--over .im-ct3__left { padding: 112px 20px 24px; }
body.ipl-design-inmodern .im-acct--over .im-ct3__card { margin: 0 8px 8px; }
@media (max-width: 959px) {
	body.ipl-design-inmodern.im-page-konto:not(.logged-in) .im-hdr { padding-inline: 16px; }
}
@media (min-width: 960px) {
	body.ipl-design-inmodern.im-page-konto:not(.logged-in) .im-hdr { padding: 30px max(38px, calc((100% - 1240px) / 2)) 12px; }
	body.ipl-design-inmodern .im-acct--over .im-ct3__stage { margin: 10px; border-radius: 16px; min-height: 700px; }
	body.ipl-design-inmodern .im-acct--over .im-ct3__left { padding: 150px 0 56px max(28px, calc((100vw - 1240px) / 2 - 10px)); align-content: start; }
	/* sidemargen står som utfylling på scenen (ikke som marg på kortet, som ville tatt av kortets bredde på brede skjermer) */
	body.ipl-design-inmodern .im-acct--over .im-ct3__stage { padding-right: max(28px, calc((100vw - 1240px) / 2 - 10px)); }
	body.ipl-design-inmodern .im-acct--over .im-ct3__card { margin: 36px 0; }
}

/* innlogget: Min konto på en glassflate (glossy glass), så tekst og tabeller ikke faller sammen med bakgrunnen */
body.ipl-design-inmodern .im-acct--in .im-acct__in > .woocommerce { position: relative; padding: 20px; border-radius: 22px; border: 1px solid rgba(255,255,255,.6);
	background: linear-gradient(135deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.16) 55%, rgba(255,255,255,.26) 100%);
	-webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(14,15,17,.04), 0 1px 2px rgba(14,15,17,.04), 0 20px 48px -14px rgba(14,15,17,.1); }
/* glansen: et lyst bånd langs toppen av glasset */
body.ipl-design-inmodern .im-acct--in .im-acct__in > .woocommerce::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 34%; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 100%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%); }
body.ipl-design-inmodern .im-acct--in .im-acct__in > .woocommerce > * { position: relative; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	body.ipl-design-inmodern .im-acct--in .im-acct__in > .woocommerce { background: rgba(255,255,255,.9); }
}
@media (min-width: 960px) {
	body.ipl-design-inmodern .im-acct--in .im-acct__in > .woocommerce { padding: 36px; border-radius: 26px; }
}
