/*
Theme Name: Oskar's Theme
Theme URI: https://herrik.dk/
Author: Oskar Herrik Nielsen
Author URI: https://herrik.dk/
Description: Oskar's Theme emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oskars-theme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

button.lightbox-trigger:focus,
button.lightbox-trigger:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.wp-block-paragraph a {
  text-decoration: none !important;
  color: #385AFF !important;
}

.wp-block-paragraph a:hover {
  color: #385AFF !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: .1em;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/* Gør både aktivt menupunkt og dets parent bold */
.wp-block-navigation__container li:has(.current-menu-item) > .wp-block-navigation-item__content,
.wp-block-navigation__container li.current-menu-item > .wp-block-navigation-item__content {
    font-weight: bold;
}

/* Stribede tabeller */
figure.wp-block-table.is-style-stripes table tbody tr:nth-child(odd) {
  background-color: var(--wp--preset--color--accent-1) !important;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    text-decoration: none;
    color: inherit;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    text-decoration: underline;
}

.wp-block-button__link {
  transition: all 0.1s ease-in-out;
}

.wp-block-button__link:hover {
  transform: scale(1.05);
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

.wp-block-post-featured-image-caption {
    font-size: var(--wp--preset--font-size--small); /* Tilpas skriftstørrelsen */
    color: var(--wp--preset--color--contrast-3); /* Giv en dæmpet farve */
    text-align: left; /* Centrer teksten under billedet */
    margin-top: 5px; /* Lidt afstand fra billedet */
}

/* Transition på knapper */
.wp-element-button {
  transition: all 0.2s ease-in-out;
}

/* Tilpas adgangskodebeskyttede sider og indlægs design */
.password-form {
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    background-color: var(--wp--preset--color--accent-1);
}

.password-form p {
    font-size: 16px;
    margin-bottom: 15px;
}

.password-form input[type="password"] {
    padding: 8px 10px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.password-form input[type="submit"] {
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
}

/* Gør headeren sticky */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: white;
    transition: transform 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
    will-change: transform;
}

/* Mobilmenu skal kunne fylde hele viewport og vise indhold korrekt */
.wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    background-color: var(--wp--preset--color--accent-1);
    overflow-y: auto;
    box-sizing: border-box;         /* korrekt breddehåndtering */
    padding-right: 0 !important;    /* undgå overskæring i højre side */
    padding-left: 0 !important;
    margin: 0 !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    padding-inline: 1rem;           /* luft til venstre/højre */
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.headroom--unpinned {
    transform: translateY(-100%);
}

.headroom--pinned {
    transform: translateY(0);
}

.site-header.no-shadow-on-top {
  box-shadow: none;
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
  padding-top: 120px; /* eller højden på din header */
}

html {
  scroll-behavior: smooth;
}

html.has-modal-open,
body.has-modal-open {
  overflow: hidden;
}

/* DETAILS */
/* Summary: gør plads til pil */
.wp-block-details summary {
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-left: 1.4em;
  color: inherit; /* Gør at pilen får samme farve som teksten */
  list-style: none; /* skjuler ::marker på ældre webkit */
}

.wp-block-details .details-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* Fjern ALLE eksisterende pile */
.wp-block-details summary::marker,
.wp-block-details summary::-webkit-details-marker,
.wp-block-details summary::before {
  content: none !important;
  display: none !important;
}

.wp-block-details summary::marker,
.wp-block-details summary::-webkit-details-marker {
  font-size: 0 !important;
  width: 0 !important;
  opacity: 0 !important;
  display: none !important;
}

/* Vores egen pil – tilføjes som nyt pseudo-element */
.wp-block-details summary::after {
  content: "";
  display: inline-block;
  background-color: currentColor;
mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='6,4 14,10 6,16'/%3E%3C/svg%3E");
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='6,4 14,10 6,16'/%3E%3C/svg%3E");
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: contain;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
}

/* Når åben – roter pil */
.wp-block-details[open] summary::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Farve på indhold */
.wp-block-details > *:not(summary) {
  color: var(--wp--preset--color--brand-2);
}

/* Glidende åbning/lukning */
.wp-block-details .details-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.wp-block-details[open] .details-content {
  max-height: 1000px;
  opacity: 1;
}

.grecaptcha-badge {
  visibility: hidden;
}