/*
Theme Name: Digga
Theme URI: 
Author: Digitance
Author URI: 
Description: Skriver sen
Requires at least: 6.8.3
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.12.19
License: Diggawp, Digitance
License URI: https://digitance.se
Tags: Block Editor Patterns, Site Editor
*/

/*  CSS General Styles  */
html {
  scroll-behavior: smooth;
}

pre {
	white-space: pre-wrap;
}

h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

:where(.editor-styles-wrapper) .is-root-container.alignfull {
  padding-right: 0;
  padding-left: 0;
}

:where(.wp-site-blocks) > .wp-block-post-content {
  margin-block: 0 !important;
}

/* positions */
.absolute {
  position: absolute !important;
}
.relative {
  position: relative;
}
.top-0 {
  top: 0;
}
.left-0 {
  left: 0;
}
.right-0 {
  right: 0;
}
.bottom-0 {
  bottom: 0;
}
.z-index-10 {
  z-index: 10;
}
.z-index-900 {
  z-index: 900;
}

/*  Digga Code inline  */
*:not(.wp-block-code) > code {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--x-small);
	padding: 3px 8px;
	position: relative;
	border-radius: 6px;
  top: -2px;
}

.inverted-radius {
  --r: 20px; /* the radius */
  --s: 30px; /* size of inner curve */
  --x: 10px; /* horizontal offset (no percentange) */
  --y: 10px; /* vertical offset (no percentange) */

  --_m: /calc(2 * var(--r)) calc(2 * var(--r)) radial-gradient(#000 70%, #0000
        72%);
  --_g: conic-gradient(at calc(100% - var(--r)) var(--r), #0000 25%, #000 0);
  --_d: (var(--s) + var(--r));
  mask: calc(100% - var(--_d) - var(--x)) 0 var(--_m),
    100% calc(var(--_d) + var(--y)) var(--_m),
    radial-gradient(var(--s) at 100% 0, #0000 99%, #000 calc(100% + 1px))
      calc(-1 * var(--r) - var(--x)) calc(var(--r) + var(--y)),
    var(--_g) calc(-1 * var(--_d) - var(--x)) 0,
    var(--_g) 0 calc(var(--_d) + var(--y));
  mask-repeat: no-repeat;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Digga Mer-blocket */

/* Digga Scroll Top */
p.digga-scroll-top {
    position: absolute;
}
.digga-scroll-top::before{
    font-size: 20px;
    cursor: pointer;
    background: var(--wp--preset--color--contrast-2); 
    color: var(--wp--preset--color--base);
    font-family: var(--wp--preset--font-family--headings);
    font-weight: 900;
    content: '↑'; 
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 99;
}
.digga-scroll-top:hover::before {
    background: var(--wp--preset--color--contrast) !important;
    color: var(--wp--preset--color--base);
}

@media only screen and (max-width: 781px) {
.digga-scroll-top {
		bottom: 10px;
		right: 10px;
	}
}

/*  Animation Mobile Navigation  */
@media only screen and (max-width: 599px) {

  .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container {
    transition-timing-function: ease-in;
    transition: 0s;
    transform: translateX(130%);
    display: block;
  }

  .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open {
    visibility: visible;
    transition-timing-function: ease-out;
    transition: .7s;
    transform: translateX(0);
    top: 0;
  }

  body.admin-bar .wp-block-navigation.is-responsive .wp-block-navigation__responsive-container.is-menu-open {
    top: 32px;
  }

  .wp-block-navigation.is-responsive .always-shown+.wp-block-navigation__responsive-container {
  transition-timing-function: ease-in;
  transition: 0s;
  transform: translateY(-130%);
  display: block;
}

.wp-block-navigation.is-responsive .always-shown+.wp-block-navigation__responsive-container.is-menu-open {
  visibility: visible;
  transition-timing-function: ease-out;
  transition: .7s;
  transform: translateY(0);
  top: 0;
  }
}

/*  Digga Shapes  */
.digga-shape-outside-circle {
  float: none;
  shape-outside: circle(50%);
  clip-path: circle(50%);
}

/*  Image Scale On Hover  */
.wp-block-image img {
	transition: scale 400ms ease;
}
.wp-block-image:hover img,
.wp-block-image:focus-within img {
	scale: 1.03;
}

/*  Link styles  */
footer a,
.homelink a {
	text-decoration: none;
}

/*  Marquee styles  */
.marquee {
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  user-select: none;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}
.marquee-item {
  animation-duration: 6s ;
	animation-iteration-count: infinite ;
	animation-name: marquee-content ;
	animation-timing-function: linear ;
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  width: 150px;
  gap: 2.5rem;
}
.marquee-item:hover {
	animation-play-state: paused ;
}

@keyframes marquee-content {
	from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 2.5rem));
  }
}

/* PLUGINS CSS
--------------------------------------------- */
/* Hyperlink Group Block */
.wp-block-tiptip-hyperlink-group-block, .wp-block-tiptip-hyperlink-group-block a p {
  text-decoration: none;
}

/* SimpleTOC Spacing */
.simpletoc.wp-block-simple-toc ul li, ol li {
  margin: 0 0 1rem 0;
}