/*
 * Copyright 2025 Alexander Orlov <alexander.orlov@loxal.net>. All rights reserved.
 * Ayu Mirage Theme
 */

:root {
    --unused0-color: hsla(261, 27%, 56%, 1);
    --unused1-color: hsla(35, 85%, 65%, 1);
    /*--base, neutral, key, shade, tint, tone, ;*/
    --unused2-color: hsla(95, 38%, 62%, 1);
    --focus-color: hsla(40, 94%, 64%, 1);
    --accent-color: hsla(212, 100%, 67%, 1);
    --primary-color: hsla(39, 100%, 71%, 1);
    --secondary-color: hsla(220, 12%, 50%, 1);
    --complementary-color: hsla(191, 97%, 70%, 1);
    --spot-color: hsla(14, 83%, 65%, 1);
    --highlight-color: hsla(261, 27%, 56%, 1);
    --info-color: hsla(220, 17%, 28%, 1);
    --std-back-color: hsla(220, 21%, 16%, 1);
    --std-front-color: hsla(220, 14%, 71%, 1);
    --back-color: hsla(220, 21%, 21%, 1);
    --front-color: hsla(220, 14%, 78%, 1);
}

html {
    min-width: 37rem;
}

body {
    background: repeating-linear-gradient(90deg, var(--info-color), var(--back-color));
    font-family: system-ui, sans-serif;
    color: var(--front-color);
}

article {
    max-width: 60rem;
    text-align: justify-all;
}

/*.realm:hover[disabled], */
.realm:hover:disabled {
    color: var(--highlight-color);
    background-color: initial;
}

.realm:hover {
    color: var(--highlight-color);
    background-color: var(--accent-color);
}

#control-panel {
    background: linear-gradient(120deg, var(--back-color), var(--std-back-color));
}

#main {
    background-color: var(--back-color);
    border-radius: 0 0 1rem 1rem;
}

#header-description {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

#title, #header-title {
    color: var(--primary-color);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

#title {
    font-size: 3rem;
    font-weight: bold;
}

.success {
    /*ying & yang colors?*/
    color: hsla(95, 78%, 49%, 1);
}

.warn {
    /*ying & yang colors?*/
    color: hsla(14, 83%, 65%, 1);
}

.info {
    text-align: center;
    position: fixed;
    top: 11rem;
    left: auto;
    background: var(--back-color);
    width: 18rem;
    margin: 1rem;
    padding: 1rem;
    border: .1rem solid var(--info-color);
    border-radius: 1rem;
}

.invalidField {
    color: var(--accent-color);
    background-color: var(--highlight-color);
    border: .1rem solid var(--accent-color);
}

.missing-value {
    color: #f07178;
    float: right;
}

.post {
    margin-bottom: 3rem;
}

small {
    font-size: .8rem;
}

.compact {
    font-size: 16px;
}

a {
    color: var(--focus-color);
    text-decoration: none;
}

/* WCAG 1.4.1 — inline links inside body content must be distinguishable
   without relying on color alone, so restore the underline there. */
p a, li a, dd a, td a, section > a, article > a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
}

a:active {
    color: var(--accent-color);
}

a:hover {
    color: var(--focus-color);
}

a:visited {
    color: var(--accent-color);
}

input {
    color: var(--std-front-color);
    background: var(--std-back-color);
    margin-bottom: .6rem;
    border-radius: .5rem;
    padding: .5rem;
    border: .1rem solid var(--info-color);
}

button, input[type="submit"] {
    margin: 1.5rem;
    padding: .8rem;
    border: .1rem solid var(--info-color);
    border-radius: .2rem;
}

input[readonly] {
    background: #3d424d;
}

.input-long {
    width: 22rem;
}

textarea {
    color: var(--std-front-color);
    background: var(--std-back-color);
    width: 90%;
    height: 11rem;
    margin: .3rem .3rem .3rem 2rem;
    padding: 1rem;
    border-radius: .5rem;
    border: .1rem solid var(--info-color);
}

table {
    border-collapse: collapse;
    border-radius: 1rem;
    width: 99%;
}

th {
    padding: .5rem;
    background: var(--info-color);
    border: .1rem solid var(--info-color);
}

td {
    padding: .5rem;
}

fieldset {
    padding: 1rem;
    margin: 1rem;
    border: .1rem solid #3d424d;
    border-radius: 0 .5rem 0 .5rem;
}

dialog {
    color: var(--accent-color);
    background-color: var(--info-color);
}

span.caps {
    border-bottom: .1rem dashed #5c6166;
}

label {
    margin-right: 1rem;
}

p {
    margin: 1rem;
    text-align: justify;
}

.long-text {
    column-count: 2;
}

pre {
    overflow: auto;
}

code {
    font-size: 1rem;
}

/* Gadget-specific overrides */
input#url {
    max-width: none;
    width: 100%;
}

input#email {
    max-width: none;
    width: 50%;
}

button.gadget-button,
.gadget-button {
    margin: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 0.5rem;
    border: 1px solid var(--focus-color);
    background: var(--focus-color);
    color: var(--std-back-color);
    cursor: pointer;
    box-sizing: border-box;
    display: inline-block;
    transition: opacity 0.2s, transform 0.1s, background 0.1s;
}

button.gadget-button:hover:not(:disabled),
.gadget-button:hover:not(:disabled) {
    opacity: 0.9;
}

button.gadget-button:disabled,
.gadget-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.gadget-button:active:not(:disabled),
.gadget-button:active:not(:disabled) {
    transform: scale(0.95) translateY(2px);
    opacity: 0.75;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.4);
    background: #c9982e;
}

button.gadget-button-secondary,
.gadget-button-secondary {
    background: transparent;
    border: 1px solid var(--focus-color);
    color: var(--focus-color);
}

#notificationCenter {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    border-radius: 0.5rem;
    border: 2px solid var(--focus-color);
    background: var(--back-color);
    color: var(--front-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}