/*
|--------------------------------------------------------------------------
| Wonder App - Vendor Application
| File: /vendor_app/assets/css/reset.css
|--------------------------------------------------------------------------
| Purpose:
| - Browser default styles reset
| - Consistent box sizing
| - Consistent typography inheritance
| - Form control normalization
| - Media element normalization
| - Accessibility-friendly focus handling
| - Prevent unwanted default spacing
|
| NOTE:
| variables.css is loaded before this file from main.css.
|--------------------------------------------------------------------------
*/


/* ==========================================================================
   1. BOX SIZING
   ========================================================================== */

html {
    box-sizing: border-box;
}

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


/* ==========================================================================
   2. DOCUMENT
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
}


/* ==========================================================================
   3. GLOBAL ELEMENT DEFAULTS
   ========================================================================== */

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

blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: none;
}

address {
    font-style: normal;
}

hr {
    height: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid currentColor;
}


/* ==========================================================================
   4. LISTS
   ========================================================================== */

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

menu {
    margin: 0;
    padding: 0;
}


/* ==========================================================================
   5. LINKS
   ========================================================================== */

a {
    color: inherit;
    text-decoration: none;
}

a:active,
a:hover {
    outline: 0;
}


/* ==========================================================================
   6. MEDIA ELEMENTS
   ========================================================================== */

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

img,
svg {
    vertical-align: middle;
}

img {
    border-style: none;
}

iframe {
    display: block;
    max-width: 100%;
    border: 0;
}

audio,
video {
    vertical-align: middle;
}


/* ==========================================================================
   7. SVG
   ========================================================================== */

svg {
    overflow: hidden;
}

svg:not([fill]) {
    fill: currentColor;
}


/* ==========================================================================
   8. TABLES
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

caption {
    text-align: left;
}

th {
    font-weight: inherit;
    text-align: inherit;
}


/* ==========================================================================
   9. FORMS - BASE
   ========================================================================== */

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

button,
input,
select,
textarea {
    line-height: inherit;
}

button,
select {
    text-transform: none;
}


/* ==========================================================================
   10. BUTTONS
   ========================================================================== */

button {
    overflow: visible;
    background: transparent;
    border: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    appearance: button;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
    cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="reset"]:disabled,
[type="submit"]:disabled {
    cursor: not-allowed;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    padding: 0;
    border: 0;
}


/* ==========================================================================
   11. INPUTS
   ========================================================================== */

input {
    overflow: visible;
}

input[type="search"] {
    -webkit-appearance: textfield;
    appearance: textfield;
    outline-offset: -2px;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

input[type="checkbox"],
input[type="radio"] {
    padding: 0;
}

input[type="checkbox"],
input[type="radio"] {
    vertical-align: middle;
}

input::placeholder,
textarea::placeholder {
    color: inherit;
    opacity: 0.65;
}


/* ==========================================================================
   12. SELECT
   ========================================================================== */

select {
    cursor: pointer;
}

select:disabled {
    cursor: not-allowed;
}


/* ==========================================================================
   13. TEXTAREA
   ========================================================================== */

textarea {
    overflow: auto;
    resize: vertical;
}


/* ==========================================================================
   14. FIELDSET / LEGEND
   ========================================================================== */

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    display: block;
    width: 100%;
    padding: 0;
}


/* ==========================================================================
   15. FILE INPUT
   ========================================================================== */

[type="file"] {
    cursor: pointer;
}

[type="file"]:disabled {
    cursor: not-allowed;
}


/* ==========================================================================
   16. PROGRESS
   ========================================================================== */

progress {
    vertical-align: baseline;
}


/* ==========================================================================
   17. SUMMARY / DETAILS
   ========================================================================== */

summary {
    display: list-item;
    cursor: pointer;
}


/* ==========================================================================
   18. DIALOG
   ========================================================================== */

dialog {
    margin: auto;
    padding: 0;
    border: 0;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}


/* ==========================================================================
   19. HIDDEN ATTRIBUTE
   ========================================================================== */

[hidden] {
    display: none !important;
}


/* ==========================================================================
   20. DISABLED ELEMENTS
   ========================================================================== */

:disabled {
    cursor: not-allowed;
}


/* ==========================================================================
   21. ACCESSIBILITY - FOCUS
   ========================================================================== */

/*
 * Keep keyboard focus visible.
 * Mouse/touch users do not get an unnecessary outline.
 */

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(
        --focus-ring-color,
        var(--color-primary, #2563eb)
    );

    outline-offset: 2px;
}


/* ==========================================================================
   22. ACCESSIBILITY - SKIP LINKS
   ========================================================================== */

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99999;

    padding: 0.75rem 1rem;

    transform: translateY(-120%);

    background: var(
        --color-primary,
        #2563eb
    );

    color: var(
        --color-primary-contrast,
        #ffffff
    );

    transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}


/* ==========================================================================
   23. CODE / PREFORMATTED TEXT
   ========================================================================== */

pre,
code,
kbd,
samp {
    font-family: monospace;
}

pre {
    margin: 0;
    overflow: auto;
}


/* ==========================================================================
   24. ABR / MARK
   ========================================================================== */

abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

mark {
    background: transparent;
    color: inherit;
}


/* ==========================================================================
   25. EMBED / OBJECT
   ========================================================================== */

embed,
object {
    display: block;
    max-width: 100%;
}


/* ==========================================================================
   26. TOUCH / MOBILE
   ========================================================================== */

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}


/* ==========================================================================
   27. USER SELECT
   ========================================================================== */

button,
[role="button"] {
    user-select: none;
}


/* ==========================================================================
   28. IMAGE DRAGGING
   ========================================================================== */

img,
svg {
    -webkit-user-drag: none;
}


/* ==========================================================================
   29. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

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


/* ==========================================================================
   30. PRINT RESET
   ========================================================================== */

@media print {

    *,
    *::before,
    *::after {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}


/* ==========================================================================
   END OF RESET.CSS
   ========================================================================== */