html {
    scrollbar-gutter: stable both-edges;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Arial,
        "Noto Sans",
        "Noto Sans Arabic",
        sans-serif;

    background: #ffffff;
    color: #111111;
}

.container {
    width: min(900px, calc(100% - 32px));
    margin: 40px auto;
}

h1 {
    margin-bottom: 24px;
}

.search-container {
    position: sticky;
    top: 16px;
    z-index: 100;
    width: 100%;
}

#search {
    width: 100%;

    /* Extra space on the right for the clear button */
    padding: 14px 48px 14px 16px;

    font: inherit;
    font-size: 18px;

    outline: none;

    box-sizing: border-box;

    background: #fff;
    color: #000;

    border: 2px solid #2B7338;
    border-radius: 12px;

    -webkit-appearance: none;
    appearance: none;
}


#search:focus {
    border-color: #d0d0d0;
}

/* Hide the browser's native search clear button */
#search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.clear-search {
    position: absolute;
    top: 50%;
    right: 12px;

    width: 28px;
    height: 28px;

    padding: 0;
    border: 0;

    background: transparent;
    color: #666;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.clear-search:hover {
    color: #111;
}

.clear-search:focus,
.clear-search:active {
    outline: none;
    background: transparent;
}

.clear-search[hidden] {
    display: none;
}

.clear-search svg {
    width: 18px;
    height: 18px;

    display: block;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.status {
    min-height: 24px;
    margin-top: 12px;

    color: #666;
    font-size: 14px;
}

.results {
    margin-top: 16px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;

    background: white;

    overflow: hidden;

    transition:
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.result-card:hover {
    border-color: #c8c8c8;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06);
}

.result-header {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 16px;

    border: 0;
    background: transparent;

    font: inherit;
    color: inherit;

    text-align: left;
    cursor: pointer;
}

.result-key {
    flex: 1;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.result-arrow {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    transition: transform 200ms ease;
}

.result-arrow svg {
    display: block;
}

.result-card.expanded .result-arrow {
    transform: rotate(180deg);
}


/* AnimatedVisibility equivalent */

.result-expandable {
    display: grid;
    grid-template-rows: 0fr;

    opacity: 0;

    transition:
        grid-template-rows 220ms ease,
        opacity 180ms ease;
}

.result-card.expanded .result-expandable {
    grid-template-rows: 1fr;
    opacity: 1;
}

.result-expandable-inner {
    min-height: 0;
    overflow: hidden;
}

.result-divider {
    height: 1px;

    margin: 0 16px;

    background: #e5e5e5;
}

.result-value {
    padding: 12px 16px 16px;

    font-size: 18px;
    line-height: 1.6;
}

.result-value p {
    margin: 0;
}

.result-value sup,
.result-key sup {
    font-size: 0.7em;
}

header h1 {
    margin: 16px 0px 8px 0px;
    text-align: center;
    color: #2B7338;
}

header p {
    margin: 0px;
    text-align: center;
}