/* global.css */

/* =======================================
   Color Palette and Root Variables
   ======================================= */
/* Color Palette:
- Main accent (turquoise): #20B2AA
- Lighter turquoise: #AFEEEE
- Darker turquoise: #008080
- White: #FFFFFF
- Relaxed white for dark: #F0F4F8
- Black: #000000
- Text secondary: #333333 (light), #CCCCCC (dark)
*/

:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --text-primary: #05141c;
    --text-secondary: #333333;
    --accent-primary: #20B2AA;
    --accent-secondary: #008080;
    --border-color: #AFEEEE;
    --delete-red: #FF4444;
    --sidebar-height: 60px;
    --hover-bg: rgba(32, 178, 170, 0.1);
    --navbar-height: 80px;
    --navbar-height-shrunk: 60px;
    --navbar-sidebar-gap: 0px;
    --sidebar-padding-top: 10px;
    --main-padding-top: 20px;
    --ui-zoom: 0.75;
    --page-scrollbar-inset: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #05141c;
        --bg-secondary: #1A1A1A;
        --text-primary: #F0F4F8;
        --text-secondary: #CCCCCC;
        --hover-bg: rgba(32, 178, 170, 0.2);
    }
}

/* =======================================
   Global Styles
   ======================================= */
html {
    zoom: var(--ui-zoom);
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-top-width 0.3s ease, background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh / var(--ui-zoom));
    min-height: calc(100dvh / var(--ui-zoom));
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

/* =======================================
   Main Content Styles
   ======================================= */
main {
    margin-top: 0;
    padding-top: var(--main-padding-top);
    padding-bottom: 40px;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    z-index: auto;
    flex: 1 0 auto;
}

main .grid-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

main h1 {
    margin-bottom: 30px;
    font-size: 2em;
}


.marketing-page main h1 {
    font-size: 2.6em;
}

body:has(main) {
    border-top: var(--navbar-height) solid var(--bg-primary);
    border-bottom: var(--page-scrollbar-inset) solid var(--bg-primary);
}

body:not(.logged-in).shrunk:has(main) {
    border-top-width: var(--navbar-height-shrunk);
}

body.sidebar-open:has(main) {
    border-top-width: calc(var(--navbar-height) + var(--sidebar-height));
}

body:not(.logged-in).shrunk.sidebar-open:has(main),
body.logged-in.sidebar-open:has(main) {
    border-top-width: calc(var(--navbar-height-shrunk) + var(--sidebar-height));
}

/* =======================================
   Scrollbars
   ======================================= */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-track-piece,
*::-webkit-scrollbar-corner {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

body::-webkit-scrollbar-button {
    width: 8px;
    height: 14px;
    background-color: transparent;
}

body::-webkit-scrollbar-button:hover {
    background-color: var(--hover-bg);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
