/* web page styles */

@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

* {
    box-sizing: border-box;
    line-height: 1.5;
    color: #e0e0e0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    max-width: 100%;
    margin: 0;
    background-color: #121212;
    letter-spacing: 1.2px;
}

/* header start */
header {
    position: sticky;
    top: 0;
    padding: 1rem;
    background: #121212;
    box-shadow: 0 1px 8px -2px #e0e0e0;
}

header details summary:hover {
    text-decoration: underline;
}

header form {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.filter-level,
.filter-keyword {
    flex: 1 1 calc(385px - 2rem);  /* check @media at the bottom & header's padding */
}

.filter-keyword {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: min-content 1fr;
    gap: 1px;
}

select.search,
input.search,
button.search {
    font-size: 1.1rem;
    height: 2.5rem;
    padding: 0 1rem;
    background: #0D1117;
    border: 1px solid #333;
}

input.search,
select.search {
    width: 100%;
}

button.search {
    aspect-ratio: 1 / 1;
    padding: initial;
    border-left: none;
}

.icon {
    fill: #e0e0e0;
    height: 75%;
    vertical-align: middle;
}

button.search:hover {
    background: #333;
    outline: 1px solid #e0e0e0;
}

select.search:focus,
input.search:focus,
button.search:focus {
    outline: 1px solid #e0e0e0;
}
/* header end */

.note,
.regis-container {
    background: #0D1117;
    margin: 1rem;
    padding: 0 0.8rem;
    border: 1px solid #333;
}

.note ul {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.note ul li {
    margin-bottom: 0.25rem;
}

.note p {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.scroll-top-btn {
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    position: fixed;
    color: white;
    bottom: 20px;
    right: 20px;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background-color: #333;
    text-decoration: none;
}


/* markdown styles */

.regis-container h1 {
    margin: 0;
    padding: 0;
    text-align: center;
}

.regis-container h2 {
    margin: 0;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2F353D;
}

.regis-container a {
    color: #e0e0e0 !important;
}

.regis-container a,
a#search-result {
    scroll-margin-top: 6.75rem;
}

.regis-container .heading-anchor {
    text-decoration: none;
}

.regis-container .heading-anchor:hover {
    text-decoration: underline;
}

.note blockquote,
.regis-container blockquote {
    margin: 0;
    padding-left: 1rem;
    border-left: 4px solid #3D444D;
}

.regis-container code {
    padding: 0.1rem 0.2rem;
    background-color: #1E242A;
}

.regis-container table {
  border-collapse: collapse;
}

.regis-container tr:nth-child(even){
    background-color: #151B23;
}

.regis-container th {
    background-color: #3D444D;
}

.regis-container th, .regis-container td {
    padding: 0.2rem 0.4rem;
    border: 1px solid #2F353D;
}

.regis-container li {
    margin-bottom: 0.5rem;
}

@media only screen and (max-width: 768px) {
    .scroll-top-btn {
        display: flex;
    }

    .regis-container a,
    a#search-result {
        scroll-margin-top: 10.25rem;
    }
}
