/* Shared controls for voucher creation, confirmation, and redemption. */
input,
select,
button {
    box-sizing: border-box;
    max-width: 100%;
    font: inherit;
}

input:not([type="hidden"]):not([type="submit"]),
select {
    min-height: 42px;
    margin: 4px 0;
    padding: 9px 12px;
    color: #18351b;
    background: #ffffff;
    border: 1px solid #d0ddd0;
    border-radius: 6px;
}

button,
input[type="submit"] {
    min-height: 42px;
    margin: 8px 0;
    padding: 10px 18px;
    color: #0c550e;
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

button:hover:not(:disabled),
input[type="submit"]:hover:not(:disabled) {
    background: #e6f0e6;
    border-color: #e6f0e6;
}

button:active:not(:disabled),
input[type="submit"]:active:not(:disabled) {
    background: #d0e3d0;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 3px solid #f5d98b;
    outline-offset: 3px;
}

button:disabled,
input[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

form {
    margin: 16px 0;
}

form h2 {
    margin-top: 24px;
    margin-bottom: 10px;
}

#first_sentence {
    margin: 8px 0;
}

#do_this_first {
    margin-top: 20px;
    margin-bottom: 8px;
}

@media (max-width: 540px) {
    div.label,
    div.field {
        display: block;
    }

    div.field input,
    #wish,
    select {
        width: 100%;
    }

    input[type="submit"] {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    button,
    input[type="submit"] {
        transition: none;
    }
}

.amount-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 18px;
}

.amount-option {
    position: relative;
    cursor: pointer;
}

.amount-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
}

.amount-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-width: 92px;
    min-height: 48px;
    padding: 12px 18px;
    color: #0c550e;
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
    font-size: 16px;
    font-weight: 600;
    user-select: none;
}

.amount-option:hover span {
    background: #e6f0e6;
    border-color: #e6f0e6;
}

.amount-option input:checked + span {
    background: #f5d98b;
    border-color: #f5d98b;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18), 0 0 0 2px #0c550e, 0 0 0 4px #f5d98b;
}

.amount-option:active span {
    box-shadow: none;
}

.amount-option input:focus-visible + span {
    outline: 3px solid #f5d98b;
    outline-offset: 3px;
}
