/* ==========================================================================
   TOPPERWORK - GLOBAL CSS RESET
   ==========================================================================
   Phase: 1
   Purpose:
   - Consistent browser defaults
   - Mobile-first foundation
   - Android WebView compatibility
   - iOS WebView compatibility
   - Horizontal overflow prevention
   ========================================================================== */


/* ==========================================================================
   1. UNIVERSAL BOX SIZING
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}


/* ==========================================================================
   2. ROOT DOCUMENT
   ========================================================================== */

html {
    margin: 0;
    padding: 0;

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

    -webkit-tap-highlight-color: transparent;

    scroll-behavior: smooth;
}


/* ==========================================================================
   3. BODY RESET
   ========================================================================== */

body {
    margin: 0;
    padding: 0;

    min-width: 0;
    min-height: 100vh;

    overflow-x: hidden;
}


/* ==========================================================================
   4. REMOVE DEFAULT MARGINS
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}


/* ==========================================================================
   5. LIST RESET
   ========================================================================== */

ul,
ol {
    margin: 0;
    padding: 0;

    list-style: none;
}


/* ==========================================================================
   6. MEDIA ELEMENTS
   ========================================================================== */

img,
picture,
video,
canvas,
svg {
    display: block;

    max-width: 100%;

    height: auto;
}


/* ==========================================================================
   7. FORM ELEMENT NORMALIZATION
   ========================================================================== */

input,
button,
textarea,
select {
    margin: 0;

    font: inherit;
    color: inherit;
}


button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    border: 0;
    border-radius: 0;

    background: none;

    cursor: pointer;

    -webkit-appearance: none;
    appearance: none;
}


input,
textarea,
select {
    -webkit-appearance: none;
    appearance: none;
}


/* ==========================================================================
   8. TEXTAREA
   ========================================================================== */

textarea {
    resize: vertical;
}


/* ==========================================================================
   9. BUTTON & LINK TOUCH BEHAVIOR
   ========================================================================== */

button,
a,
label,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}


/* ==========================================================================
   10. LINK RESET
   ========================================================================== */

a {
    color: inherit;
    text-decoration: none;
}


/* ==========================================================================
   11. TABLE FOUNDATION
   ========================================================================== */

table {
    width: 100%;

    border-collapse: collapse;
    border-spacing: 0;
}


/* ==========================================================================
   12. HIDDEN ATTRIBUTE
   ========================================================================== */

[hidden] {
    display: none !important;
}


/* ==========================================================================
   13. ROOT APPLICATION CONTAINER FOUNDATION
   ========================================================================== */

#app,
#topperwork-app {
    width: 100%;
    min-width: 0;

    min-height: 100vh;
}


/* ==========================================================================
   14. REDUCED MOTION ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}