/*
|--------------------------------------------------------------------------
| Wonder App - Vendor Application
| File: /vendor_app/assets/css/base.css
|--------------------------------------------------------------------------
| Purpose:
| - Global application styling
| - Typography
| - Body defaults
| - Text defaults
| - Links
| - Selection
| - Scrollbars
| - Common utility/base classes
|
| Load order:
| variables.css
| reset.css
| base.css
| layout.css
| header.css
| sidebar.css
| navigation.css
| ...
|--------------------------------------------------------------------------
*/


/* ==========================================================================
   1. ROOT / DOCUMENT
   ========================================================================== */

html {
    min-width: 320px;
    min-height: 100%;
    font-size: 16px;
}

body {
    min-width: 320px;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    background-color: var(
        --color-background,
        #f8fafc
    );

    color: var(
        --color-text,
        #1f2937
    );

    font-family: var(
        --font-family-base,
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif
    );

    font-size: var(
        --font-size-base,
        16px
    );

    font-weight: var(
        --font-weight-normal,
        400
    );

    line-height: var(
        --line-height-base,
        1.5
    );

    text-rendering: optimizeLegibility;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   2. APPLICATION ROOT
   ========================================================================== */

#app,
#root,
.app,
.vendor-app {
    min-height: 100vh;
}


/* ==========================================================================
   3. GLOBAL TEXT
   ========================================================================== */

p {
    margin: 0 0 1rem;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: var(
        --font-weight-semibold,
        600
    );
}

em,
i {
    font-style: italic;
}

small {
    font-size: var(
        --font-size-sm,
        0.875rem
    );
}

sub,
sup {
    position: relative;

    font-size: 75%;
    line-height: 0;

    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}


/* ==========================================================================
   4. HEADINGS
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;

    color: var(
        --color-heading,
        #111827
    );

    font-family: var(
        --font-family-heading,
        var(--font-family-base, Inter, sans-serif)
    );

    font-weight: var(
        --font-weight-semibold,
        600
    );

    line-height: var(
        --line-height-heading,
        1.25
    );
}

h1 {
    font-size: var(
        --font-size-h1,
        2rem
    );
}

h2 {
    font-size: var(
        --font-size-h2,
        1.5rem
    );
}

h3 {
    font-size: var(
        --font-size-h3,
        1.25rem
    );
}

h4 {
    font-size: var(
        --font-size-h4,
        1.125rem
    );
}

h5 {
    font-size: var(
        --font-size-h5,
        1rem
    );
}

h6 {
    font-size: var(
        --font-size-h6,
        0.875rem
    );
}


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

a {
    color: var(
        --color-link,
        var(--color-primary, #2563eb)
    );

    text-decoration: none;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

a:hover {
    color: var(
        --color-link-hover,
        var(--color-primary-dark, #1d4ed8)
    );
}

a:active {
    color: var(
        --color-link-active,
        var(--color-primary-dark, #1d4ed8)
    );
}

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

    outline-offset: 2px;
}


/* ==========================================================================
   6. TEXT COLORS
   ========================================================================== */

.text-primary {
    color: var(
        --color-primary,
        #2563eb
    );
}

.text-secondary {
    color: var(
        --color-text-secondary,
        #64748b
    );
}

.text-muted {
    color: var(
        --color-text-muted,
        #94a3b8
    );
}

.text-success {
    color: var(
        --color-success,
        #16a34a
    );
}

.text-warning {
    color: var(
        --color-warning,
        #d97706
    );
}

.text-danger {
    color: var(
        --color-danger,
        #dc2626
    );
}

.text-info {
    color: var(
        --color-info,
        #0284c7
    );
}

.text-white {
    color: #ffffff;
}

.text-black {
    color: #000000;
}


/* ==========================================================================
   7. TEXT ALIGNMENT
   ========================================================================== */

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-justify {
    text-align: justify;
}


/* ==========================================================================
   8. FONT WEIGHTS
   ========================================================================== */

.font-normal {
    font-weight: var(
        --font-weight-normal,
        400
    );
}

.font-medium {
    font-weight: var(
        --font-weight-medium,
        500
    );
}

.font-semibold {
    font-weight: var(
        --font-weight-semibold,
        600
    );
}

.font-bold {
    font-weight: var(
        --font-weight-bold,
        700
    );
}


/* ==========================================================================
   9. TEXT TRANSFORM
   ========================================================================== */

.text-uppercase {
    text-transform: uppercase;
}

.text-lowercase {
    text-transform: lowercase;
}

.text-capitalize {
    text-transform: capitalize;
}


/* ==========================================================================
   10. TEXT OVERFLOW
   ========================================================================== */

.text-truncate {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.text-wrap {
    white-space: normal;
    overflow-wrap: break-word;
}

.text-nowrap {
    white-space: nowrap;
}

.break-word {
    overflow-wrap: break-word;
    word-break: break-word;
}


/* ==========================================================================
   11. VISIBILITY
   ========================================================================== */

.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}

.is-hidden {
    display: none !important;
}

.is-visible {
    display: block !important;
}


/* ==========================================================================
   12. DISPLAY UTILITIES
   ========================================================================== */

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-block {
    display: inline-block !important;
}

.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.d-grid {
    display: grid !important;
}


/* ==========================================================================
   13. FLEX UTILITIES
   ========================================================================== */

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.items-stretch {
    align-items: stretch;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.justify-evenly {
    justify-content: space-evenly;
}


/* ==========================================================================
   14. WIDTH / HEIGHT UTILITIES
   ========================================================================== */

.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.h-full {
    height: 100%;
}

.h-auto {
    height: auto;
}

.min-h-screen {
    min-height: 100vh;
}


/* ==========================================================================
   15. OVERFLOW
   ========================================================================== */

.overflow-hidden {
    overflow: hidden !important;
}

.overflow-auto {
    overflow: auto !important;
}

.overflow-x-auto {
    overflow-x: auto !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

.overflow-visible {
    overflow: visible !important;
}


/* ==========================================================================
   16. POSITION
   ========================================================================== */

.position-static {
    position: static;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.position-sticky {
    position: sticky;
}


/* ==========================================================================
   17. CURSOR
   ========================================================================== */

.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.cursor-help {
    cursor: help;
}

.cursor-wait {
    cursor: wait;
}


/* ==========================================================================
   18. USER SELECT
   ========================================================================== */

.select-none {
    user-select: none;
}

.select-text {
    user-select: text;
}

.select-all {
    user-select: all;
}


/* ==========================================================================
   19. POINTER EVENTS
   ========================================================================== */

.pointer-events-none {
    pointer-events: none !important;
}

.pointer-events-auto {
    pointer-events: auto !important;
}


/* ==========================================================================
   20. BACKGROUND UTILITIES
   ========================================================================== */

.bg-primary {
    background-color: var(
        --color-primary,
        #2563eb
    );
}

.bg-secondary {
    background-color: var(
        --color-secondary,
        #64748b
    );
}

.bg-success {
    background-color: var(
        --color-success,
        #16a34a
    );
}

.bg-warning {
    background-color: var(
        --color-warning,
        #d97706
    );
}

.bg-danger {
    background-color: var(
        --color-danger,
        #dc2626
    );
}

.bg-info {
    background-color: var(
        --color-info,
        #0284c7
    );
}

.bg-white {
    background-color: #ffffff;
}

.bg-transparent {
    background-color: transparent;
}


/* ==========================================================================
   21. BORDER RADIUS UTILITIES
   ========================================================================== */

.radius-none {
    border-radius: 0;
}

.radius-sm {
    border-radius: var(
        --radius-sm,
        0.25rem
    );
}

.radius-md {
    border-radius: var(
        --radius-md,
        0.5rem
    );
}

.radius-lg {
    border-radius: var(
        --radius-lg,
        0.75rem
    );
}

.radius-xl {
    border-radius: var(
        --radius-xl,
        1rem
    );
}

.radius-full {
    border-radius: 9999px;
}


/* ==========================================================================
   22. SHADOW UTILITIES
   ========================================================================== */

.shadow-none {
    box-shadow: none;
}

.shadow-sm {
    box-shadow: var(
        --shadow-sm,
        0 1px 2px rgba(15, 23, 42, 0.05)
    );
}

.shadow-md {
    box-shadow: var(
        --shadow-md,
        0 4px 12px rgba(15, 23, 42, 0.08)
    );
}

.shadow-lg {
    box-shadow: var(
        --shadow-lg,
        0 10px 25px rgba(15, 23, 42, 0.10)
    );
}


/* ==========================================================================
   23. OPACITY
   ========================================================================== */

.opacity-0 {
    opacity: 0;
}

.opacity-25 {
    opacity: 0.25;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-100 {
    opacity: 1;
}


/* ==========================================================================
   24. Z-INDEX
   ========================================================================== */

.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

.z-auto {
    z-index: auto;
}


/* ==========================================================================
   25. SCREEN READER ONLY
   ========================================================================== */

.sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;

    overflow: visible !important;

    clip: auto !important;

    white-space: normal !important;
}


/* ==========================================================================
   26. SELECTION
   ========================================================================== */

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

    color: var(
        --color-selection-text,
        #ffffff
    );
}

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

    color: var(
        --color-selection-text,
        #ffffff
    );
}


/* ==========================================================================
   27. SCROLLBAR - WEBKIT
   ========================================================================== */

::-webkit-scrollbar {
    width: var(
        --scrollbar-width,
        8px
    );

    height: var(
        --scrollbar-height,
        8px
    );
}

::-webkit-scrollbar-track {
    background: var(
        --scrollbar-track,
        #f1f5f9
    );
}

::-webkit-scrollbar-thumb {
    background: var(
        --scrollbar-thumb,
        #cbd5e1
    );

    border-radius: 9999px;

    border: 2px solid transparent;

    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(
        --scrollbar-thumb-hover,
        #94a3b8
    );

    background-clip: padding-box;
}


/* ==========================================================================
   28. FIREFOX SCROLLBAR
   ========================================================================== */

html {
    scrollbar-width: thin;

    scrollbar-color:
        var(--scrollbar-thumb, #cbd5e1)
        var(--scrollbar-track, #f1f5f9);
}


/* ==========================================================================
   29. MOBILE TAP HIGHLIGHT
   ========================================================================== */

button,
a,
input,
select,
textarea,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}


/* ==========================================================================
   30. FORM CONTROL INHERITANCE
   ========================================================================== */

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


/* ==========================================================================
   31. DISABLED FORM CONTROLS
   ========================================================================== */

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: var(
        --disabled-opacity,
        0.65
    );
}


/* ==========================================================================
   32. PLACEHOLDER
   ========================================================================== */

::placeholder {
    color: var(
        --color-placeholder,
        #94a3b8
    );

    opacity: 1;
}


/* ==========================================================================
   33. FOCUS UTILITY
   ========================================================================== */

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

    outline-offset: 2px;
}


/* ==========================================================================
   34. DIVIDER
   ========================================================================== */

.divider {
    width: 100%;
    height: 1px;

    background-color: var(
        --color-border,
        #e2e8f0
    );
}


/* ==========================================================================
   35. VERTICAL DIVIDER
   ========================================================================== */

.divider-vertical {
    width: 1px;
    height: 100%;

    background-color: var(
        --color-border,
        #e2e8f0
    );
}


/* ==========================================================================
   36. EMPTY / PLACEHOLDER STATE
   ========================================================================== */

.empty-state {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 200px;

    padding: 2rem;

    text-align: center;

    color: var(
        --color-text-muted,
        #94a3b8
    );
}


/* ==========================================================================
   37. LOADING STATE
   ========================================================================== */

.is-loading {
    pointer-events: none;
    user-select: none;
}


/* ==========================================================================
   38. ERROR STATE
   ========================================================================== */

.has-error {
    color: var(
        --color-danger,
        #dc2626
    );
}


/* ==========================================================================
   39. SUCCESS STATE
   ========================================================================== */

.has-success {
    color: var(
        --color-success,
        #16a34a
    );
}


/* ==========================================================================
   40. WARNING STATE
   ========================================================================== */

.has-warning {
    color: var(
        --color-warning,
        #d97706
    );
}


/* ==========================================================================
   41. RESPONSIVE BASE TYPOGRAPHY
   ========================================================================== */

@media (max-width: 1199px) {

    h1 {
        font-size: var(
            --font-size-h1-tablet,
            1.875rem
        );
    }

    h2 {
        font-size: var(
            --font-size-h2-tablet,
            1.375rem
        );
    }

    h3 {
        font-size: var(
            --font-size-h3-tablet,
            1.125rem
        );
    }
}


@media (max-width: 767px) {

    html {
        font-size: 15px;
    }

    body {
        font-size: var(
            --font-size-mobile,
            0.9375rem
        );
    }

    h1 {
        font-size: var(
            --font-size-h1-mobile,
            1.625rem
        );
    }

    h2 {
        font-size: var(
            --font-size-h2-mobile,
            1.375rem
        );
    }

    h3 {
        font-size: var(
            --font-size-h3-mobile,
            1.125rem
        );
    }

    h4 {
        font-size: 1rem;
    }
}


@media (max-width: 479px) {

    html {
        font-size: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.0625rem;
    }
}


/* ==========================================================================
   42. REDUCED MOTION
   ========================================================================== */

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

    a {
        transition: none;
    }
}


/* ==========================================================================
   43. PRINT BASE
   ========================================================================== */

@media print {

    html,
    body {
        min-width: 0;
        background: #ffffff;
        color: #000000;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }

    .no-print,
    .print-hidden {
        display: none !important;
    }
}


/* ==========================================================================
   END OF BASE.CSS
   ========================================================================== */