/* ============================================================================
   common_styles.css — SHARED primitives for BOTH the app (zig/) and the
   marketing website (website/, via the website/src/common symlink).

   Keep this file limited to things both surfaces genuinely share:
     - @font-face declarations (Funnel Display, Icons)
     - :root brand variables
     - heading font, the material-symbols icon base, the .btn button system,
       and a few universal utilities/element resets.

   App-only styling lives in zig/src/styles/styles.css; website-only styling
   lives in website/src/styles/styles.css. Loaded BEFORE those project sheets
   so each project can override these primitives without !important.
   ============================================================================ */

/* Fonts & brand ----------------------------------------------------------- */

@font-face {
    font-family: "Funnel Display";
    src: url("./FunnelDisplay-VariableFont_wght.ttf") format("truetype");
    font-weight: 300 800;
    font-style: normal;
}

@font-face {
    font-family: "Icons";
    src: url("./MaterialSymbolsSharp-VariableFont_FILL,GRAD,opsz,wght.ttf") format("truetype");
    font-style: normal;
}

:root {
    --primary-accent: #F2AE3F;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Funnel Display", sans-serif !important;
}

/* Universal utilities & element resets ------------------------------------ */

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

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

pre {
    margin: 0;
}

a {
    cursor: pointer;
}

/* Ensure textareas use the default font and size */
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Icons (material-symbols base) ------------------------------------------- */

.material-symbols-outlined {
    font-family: "Icons";
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 1.3rem;
    color: #969595;
    transition: all 0.2s ease;
}

.material-symbols-outlined:not(button):not(button *):hover {
    color: #F2AE3F;
    font-weight: 600;
}

button.material-symbols-outlined {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

button .material-symbols-outlined {
    font-size: 1.2rem;
    vertical-align: middle;
    line-height: 1;
    color: black;
    padding-right: 0.4rem;
}

.btn-sm .material-symbols-outlined {
    font-size: 1.0rem;
    vertical-align: middle;
    line-height: 1;
    color: black;
    padding-right: 0.4rem;
}

/* Buttons ----------------------------------------------------------------- */

.btn .hotkey {
    font-weight: bold;
}

.btn {
    border-radius: 1rem;
    border-width: 1px;
    padding-right: 0.8rem;
    padding-left: 0.8rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.9rem;
    gap: 6px;
    border: 1px solid #0000001A;
    color: black;
}

.btn.no-focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn.no-focus:focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn-crop-right {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

.btn:hover {
    background-color: #F2AE3F !important;
    color: white !important;
}

.btn.btn-primary {
    color: black;
    background: #F2AE3F;
}

.btn.btn-outline-primary {
    border: 1px solid #0000001A;
    color: black;
}

.btn.btn-secondary {
    color: white;
    background: #584424;
}

.btn.btn-outline-secondary {
    border: 1px solid #ddd;
    color: black;
}

.btn.btn-outline-secondary.active {
    background: #F2EEE8;
}

button:disabled,
.btn:disabled,
.btn-group .btn:disabled,
input:disabled {
    color: #6c6c6c !important;
    background-color: #dad9d9 !important;
}

.btn-group label.disabled {
    color: #6c6c6c !important;
    background-color: #dad9d9 !important;
}

.btn-sm {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

/*
Bootstrap defines :focus-visible attributes for buttons
which are only visible when the user uses the Tab key to navigate.
I want dialog boxes with default buttons to show their default status
so I need to overload here to add a box-shadow. Unfortunately, this
is a single color whereas BS5 has a color per button type such as danger, etc.
but this is good enough to make the point that you can press Enter.
*/
.btn:focus:not(:focus-visible) {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}
