* {
    margin: 0;
    padding: 0;
    font-family: "Inter";
    text-decoration: none;
}

body {
    overflow-x: hidden;
    background-color: var(--color-background-light);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6, p, label, a, button, input, textarea {
    color: var(--color-text-primary);
}

input, textarea {
    border: none;
    outline: none;
}

.success,
.info,
.warning,
.error {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

.success {
    color: var(--color-success);
}

.info {
    color: var(--color-info);
}

.warning {
    color: var(--color-warning);
}

.error {
    color: var(--color-error);
}

.success::before,
.info::before,
.warning::before,
.error::before {
    content: "";
    display: inline-block;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.success::before {
    background-image: url("https://cdn.tarylem.com/img/icon-success.webp");
}

.info::before {
    background-image: url("https://cdn.tarylem.com/img/icon-info.webp");
}

.warning::before {
    background-image: url("https://cdn.tarylem.com/img/icon-warning.webp");
}

.error::before {
    background-image: url("https://cdn.tarylem.com/img/icon-error.webp");
}

.success[style*="display:none"],
.info[style*="display:none"],
.warning[style*="display:none"],
.error[style*="display:none"],
.success.hidden,
.info.hidden,
.warning.hidden,
.error.hidden,
.success:empty,
.info:empty,
.warning:empty,
.error:empty {
    display: none;
}

input {
    font-size: 1.25rem;
}

button {
    border: none;
}

.inline-flex {
    display: inline-flex;
    justify-content: center;
}

/* Inputs with floating labels */
.input .input-container,
.input:not(:has(.input-container)) {
    position: relative;
    padding: 10px;
    height: var(--button-height);
    background-color: var(--color-background-dark);
    border-radius: var(--border-radius);
    border-width: 1px;
    border-color: var(--color-background-light);
    border-style: solid;
}

.input input, .input textarea {
    width: 100%;
    height: 100%;
    background: none;
    resize: none;
    font-size: 1.25rem;
    line-height: 1.25rem;
    vertical-align: middle;
    text-align: left;
}

.input label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--motion-ease-200);
    pointer-events: none;
    background-color: var(--color-background-dark);
    padding: 8px;
}

.input .input-feedback {
    margin-top: 10px;
}

.input .input-container:has(input:focus + label),
.input .input-container:has(input:not(:placeholder-shown) + label),
.input:not(:has(.input-container)):has(input:focus + label),
.input:not(:has(.input-container)):has(input:not(:placeholder-shown) + label),
.input .input-container:has(textarea:focus + label),
.input .input-container:has(textarea:not(:placeholder-shown) + label),
.input:not(:has(.input-container)):has(textarea:focus + label),
.input:not(:has(.input-container)):has(textarea:not(:placeholder-shown) + label) {
    border-color: color-mix(in srgb, var(--color-background-light) 100%, var(--color-primary) 25%);
}

.input input:focus + label,
.input input:not(:placeholder-shown) + label,
.input textarea:focus + label,
.input textarea:not(:placeholder-shown) + label {
    top: 0;
    left: 8px;
    transform: scale(85%) translate(-8px, calc(-50% - 4px));
    color: color-mix(in srgb, var(--color-background-light) 100%, var(--color-primary) 25%);
}

/* Themed Version */

.input.themed .input-container,
.input.themed:not(:has(.input-container)) {
    background-color: var(--color-background-light);
    border-color: var(--color-text-primary);
}

.input.themed label {
    background-color: var(--color-background-light);
}

.input.themed .input-container:has(input:focus + label),
.input.themed .input-container:has(input:not(:placeholder-shown) + label),
.input.themed:not(:has(.input-container)):has(input:focus + label),
.input.themed:not(:has(.input-container)):has(input:not(:placeholder-shown) + label),
.input.themed .input-container:has(textarea:focus + label),
.input.themed .input-container:has(textarea:not(:placeholder-shown) + label),
.input.themed:not(:has(.input-container)):has(textarea:focus + label),
.input.themed:not(:has(.input-container)):has(textarea:not(:placeholder-shown) + label) {
    border-color: color-mix(in srgb, var(--color-text-primary) 100%, var(--color-primary) 25%);
}

.input.themed input:focus + label,
.input.themed input:not(:placeholder-shown) + label,
.input.themed textarea:focus + label,
.input.themed textarea:not(:placeholder-shown) + label {
    top: 0;
    left: 8px;
    transform: scale(85%) translate(-8px, calc(-50% - 4px));
    color: color-mix(in srgb, var(--color-text-primary) 100%, var(--color-primary) 25%);
}

/* One Time Password Inputs */
.otp-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.otp-input {
    width: 10%;
    height: 50px;
    padding: 10px;
    margin: auto;
    text-align: center;
    border-radius: var(--border-radius);
    background-color: var(--color-background-dark);
    border-width: 1px !important;
    border-color: var(--color-background-light) !important;
    border-style: solid !important;
    transition: var(--motion-ease-200);
}

.otp-input:focus {
    border-color: color-mix(in srgb, var(--color-background-light) 100%, var(--color-primary) 25%) !important;
    color: color-mix(in srgb, var(--color-text-light) 100%, var(--color-primary) 25%) !important;
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Themed Version */
.otp-container.themed .otp-input {
    background-color: var(--color-background-light);
    border-color: var(--color-text-primary) !important;
}

.otp-container.themed .otp-input:focus {
    border-color: color-mix(in srgb, var(--color-text-primary) 100%, var(--color-primary) 25%) !important;
    color: color-mix(in srgb, var(--color-text-primary) 100%, var(--color-primary) 25%) !important;
}

/* Buttons */
.button, .button-2 {
    display: inline-block;
    border-radius: var(--button-border-radius);
    transition: var(--motion-ease-200);
    text-align: center;
    vertical-align: middle;
    font-size: 1rem;
    padding: 0 1rem 0 1rem;
    line-height: var(--button-height);
    height: var(--button-height);
    cursor: pointer;
}

.button {
    background-color: var(--color-background-light);
    color: var(--color-text-primary);
}

.button:hover {
    background-color: color-mix(in srgb, var(--color-background-light) 100%, var(--color-primary) 25%);
}

.button-2 {
    background-color: transparent;
    color: var(--color-text-light);
}

.button-2:hover {
    background-color: color-mix(in srgb, transparent, var(--color-primary) 10%);
}

/* Accents */
.accent-atmos { border-left: 6px solid var(--color-atmos-accent); }
.accent-forms { border-left: 6px solid var(--color-forms-accent); }
.accent-dev { border-left: 6px solid var(--color-dev-accent); }
.accent-status { border-left: 6px solid var(--color-status-accent); }
.accent-auth { border-left: 6px solid var(--color-auth-accent); }
.accent-api { border-left: 6px solid var(--color-api-accent); }
.accent-portal { border-left: 6px solid var(--color-portal-accent); }

/* Hover Card */
.hover-card {
    background-color: var(--color-background-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--motion-ease-200), box-shadow var(--motion-ease-200);
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown .input {
    width: calc(100% - 20px);
}

.dropdown-input {
    cursor: pointer;
    position: relative;
}

.dropdown-menu {
    display: none;
    overflow-y: scroll;
    max-height: 450px;
    z-index: 499;
    width: calc(100% - 20px);
    position: absolute;
    background-color: var(--color-background-light);
    border-color: var(--color-text-primary);
    padding: 10px;
    border-radius: var(--border-radius);
    border-width: 1px;
    border-style: solid;
    margin-top: 10px;
    box-shadow: var(--box-shadow);
    transition: transform var(--motion-ease-200), box-shadow var(--motion-ease-200);
}

.dropdown-menu:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-4px)
}

.dropdown-menu-option {
    width: calc(100% - 8px);
    text-align: center;
    background-color: transparent;
    padding: 4px;
    border-radius: 10px;
    font-size: 1rem;
    height: calc(1rem + 8px);
    margin-bottom: 5px;
    cursor: pointer;
    transition: background var(--motion-ease-200);
}

.dropdown-menu-option:hover {
    background-color: rgba(0, 0, 0, .1);
}

.dropdown-menu-option.selected {
    background-color: color-mix(in srgb, var(--color-background-light) 100%, var(--color-primary) 25%);
}

.dropdown-header {
    font-size: 1.25rem;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-text-primary);
}