/**
 * Joowa Theme - Modern CSS Reset
 *
 * Based on Andy Bell's "A (more) Modern CSS Reset" with
 * additional rules for WordPress theme compatibility.
 *
 * @package Joowa
 * @since   1.0.0
 */

/* ==========================================================================
   Box Sizing
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Margin & Padding Reset
   ========================================================================== */

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   HTML & Body
   ========================================================================== */

html {
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Media Elements
   ========================================================================== */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img,
picture,
video {
    height: auto;
}

/* ==========================================================================
   Form Inheritance
   ========================================================================== */

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   Typography Overflow
   ========================================================================== */

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* ==========================================================================
   Stacking Context Isolation
   ========================================================================== */

#root,
#__next {
    isolation: isolate;
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul[role="list"],
ol[role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Smooth Scroll (when not reduced motion)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    html:focus-within {
        scroll-behavior: smooth;
    }
}

/* ==========================================================================
   Misc Resets
   ========================================================================== */

/* Remove built-in form typography styles */
button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* Remove default fieldset styles */
fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

/* Remove textarea resize handle direction */
textarea {
    resize: vertical;
}

/* Remove summary arrow in Webkit */
summary {
    display: list-item;
}

/* Prevent super/sub from affecting line-height */
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* Hidden attribute support */
[hidden] {
    display: none !important;
}
