@import './colors.css';
@import './ionic.css';

@font-face {
    font-family: 'Work-Sans';
    src:
        local('Work Sans'),
        local('Work-Sans'),
        url('/assets/fonts/worksans/WorkSans-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-size: normal;
    font-display: swap;
    font-optical-sizing: auto;
}

html,
body {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* Generic variables to define the Themes */
:root {
    --adarma-background: var(--Subtle-6-tw);
    --adarma-foreground: var(--Black-tint-tw);

    --adarma-card: var(--White-tw);
    --adarma-card-foreground: var(--Black-tint-tw);

    --adarma-primary: var(--Teal-700-tw);
    --adarma-primary-foreground: var(--White-tw);

    --adarma-secondary: var(--Blue-800-Secondary-tw);
    --adarma-secondary-foreground: var(--White-tw);

    --adarma-tertiary: var(--Teal-900-Primary-Dark-tw);
    --adarma-tertiary-foreground: var(--White-tw);

    --adarma-success: var(--Success-tw);
    --adarma-success-foreground: var(--Black-tint-tw);

    --adarma-warning: var(--Warning-1-tw);
    --adarma-warning-foreground: var(--Black-tint-tw);

    --adarma-warning-2: var(--Warning-2-tw);
    --adarma-warning-2-foreground: var(--Black-tint-tw);

    --adarma-danger: var(--Danger-tw);
    --adarma-danger-foreground: var(--White-tw);

    --adarma-light: var(--Subtle-6-tw);
    --adarma-light-foreground: var(--Black-tint-tw);

    --adarma-medium: var(--Subtle-4-tw);
    --adarma-medium-foreground: var(--White-tw);

    --adarma-dark: var(--Black-tint-tw);
    --adarma-dark-foreground: var(--White-tw);

    --adarma-toolbar: var(--White-tw);
    --adarma-toolbar-foreground: var(--Black-tint-tw);

    --adarma-avatar: var(--adarma-primary-tw);
    --adarma-avatar-foreground: var(--White-tw);

    --adarma-muted: var(--Subtle-5-tw);
    --adarma-muted-foreground: var(--Subtle-3-tw);

    --adarma-input: var(--Subtle-4-tw);
    --adarma-border: var(--Subtle-4-tw);

    --adarma-accent: var(--Subtle-5-tw);
    --adarma-accent-foreground: var(--Black-tint-tw);

    --Subtle-1-tw: var(--Grey-1-tw);
    --Subtle-2-tw: var(--Grey-2-tw);
    --Subtle-3-tw: var(--Grey-3-tw);
    --Subtle-4-tw: var(--Grey-4-tw);
    --Subtle-5-tw: var(--Grey-5-tw);
    --Subtle-6-tw: var(--Grey-6-tw);
}

body.dark {
    --adarma-background: var(--Subtle-6-tw);
    --adarma-foreground: var(--White-tw);

    --adarma-card: var(--Black-tint-tw);
    --adarma-card-foreground: var(--White-tw);

    --adarma-primary: var(--Teal-600-tw);
    --adarma-primary-foreground: var(--Black-tint-tw);

    --adarma-toolbar: var(--Black-tint-tw);
    --adarma-toolbar-foreground: var(--White-tw);

    --adarma-avatar: var(--adarma-primary-tw);
    --adarma-avatar-foreground: var(--Black-tint-tw);

    --adarma-muted: var(--Subtle-4-tw);
    --adarma-muted-foreground: var(--Subtle-3-tw);

    --adarma-input: var(--Subtle-4-tw);
    --adarma-border: var(--Subtle-4-tw);

    --adarma-accent: var(--Subtle-5-tw);
    --adarma-accent-foreground: var(--White-tw);

    --Subtle-1-tw: var(--Grey-6-tw);
    --Subtle-2-tw: var(--Grey-5-tw);
    --Subtle-3-tw: var(--Grey-4-tw);
    --Subtle-4-tw: var(--Grey-3-tw);
    --Subtle-5-tw: var(--Grey-2-tw);
    --Subtle-6-tw: var(--Grey-1-tw);
}

/* for future socket themes */
body.coral {
    --ion-color-primary: rgb(var(--adarma-coral));
    --toolbar-background: rgb(var(--adarma-coral));
}

.branding {
    background-image: url('/assets/img/adarma_wordmark.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1rem;
    width: 10rem;
}

.branding-logo {
    background-image: url('/assets/img/socket_logo.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5rem;
    width: 6rem;
}

body.dark .branding-logo {
    background-image: url('/assets/img/socket_logo_reverse.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5rem;
    width: 6rem;
}

body.dark .branding,
.light-branding {
    background-image: url('/assets/img/adarma_wordmark_reverse.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1rem;
    width: 10rem;
}

.branding-home {
    background-image: url('/assets/img/socket_logo.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 100%;
    width: 100%;
    max-width: 40rem;
    background-position: center;
}

body.dark .branding-home {
    background-image: url('/assets/img/socket_logo_reverse.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    height: 100%;
    width: 100%;
    max-width: 40rem;
}

p {
    color: var(--Secondary-Text);
}

h1,
h2,
h3,
h4,
h5,
h6,
ion-header {
    color: var(--ion-text-color);
    font-family: 'Work-Sans', 'Arial Bold';
}

.socket-modal {
    --height: auto;
}

.socket-modal .ion-page {
    position: relative;
    contain: content;
    max-height: 80vh;
}

.socket-modal .modal-content {
    overflow: auto;
}

.modal-btn {
    color: var(--Modal-Cancel);
}

ion-action-sheet button {
    color: var(--ion-text-color) !important;
}

ion-action-sheet button.action-sheet-selected {
    color: var(--ion-color-primary) !important;
}

ion-action-sheet button.action-sheet-cancel {
    color: var(--ion-color-primary) !important;
}

ion-alert .alert-wrapper {
    --max-width: 60vw;
    --width: 30vw;
}

.plugin-popover {
    --width: fit-content;
}

/* This is a work around to cover the blue background of autofill in Chrome */
.native-input.sc-ion-input-md:-webkit-autofill {
    -webkit-background-clip: text;
}

/* This stops scrolling due to margin in the ion select popover  */
.sc-ion-select-popover-h ion-list.sc-ion-select-popover {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

/* Helpers */
.cursor-default {
    cursor: default;
}

.text-align-center {
    text-align: center;
    width: 100%;
}

/* Ion Icons can't use in:fade transition from svelte. */
.fade-in {
    animation: fadeIn 2s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* All scroll bars look the same */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ion-color-step-500);
    border-radius: 5px;
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0);
}

.select-label-placement-fixed,
.label-text-wrapper {
    max-width: 500px;
}

/* Fonts */
.font-body-medium-regular {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 19px; /* 135.714% */
}
.font-body-large-regular {
    /* Body Large Regular */
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px; /* 137.5% */
}
.font-subtitle-large-regular {
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 29px; /* 145% */
}
.font-headline-large-regular {
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 40px;
}
.font-headline-large-bold {
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px; /* 125% */
}
.font-subtitle-large-bold {
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 29px; /* 145% */
    letter-spacing: 0.08px;
}
.font-title-bold {
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 31px; /* 129.167% */
}
.font-super-title-bold {
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    line-height: 34px; /* 121.429% */
}
.font-subtitle-medium-regular {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px; /* 144.444% */
}
.font-body-large-bold {
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px; /* 137.5% */
}
.font-body-small-bold {
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 15px; /* 125% */
}

.color-subtle-3 {
    color: var(--Subtle-3);
}
.color-subtle-4 {
    color: var(--Subtle-4);
}
.color-subtle-6 {
    color: var(--Subtle-6);
}
.color-primary-link {
    color: var(--ionic-primary-link);
}
.color-secondary-link {
    color: var(--ionic-secondary-link);
}
.color-secondary-text {
    color: var(--ionic-secondary-text);
}
.color-danger {
    color: var(--Danger);
}
.color-success {
    color: var(--Success);
}

.global-icon-heading {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    color: var(--ion-text-color);
}
