/* Layout */
.donate-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

.donate.content-tile,
.thanks.content-tile {
    margin: 5vh auto 2rem;
    padding: 2rem 2.25rem;
    box-shadow: 0 0 24px rgba(255, 140, 0, .45);
    border-radius: 14px;
    background: rgba(17, 17, 17, .9);
}

/* Thanks page overrides */
.thanks.content-tile {
    max-width: 720px;
    margin-top: 10vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thanks p {
    color: #ddd;
    font-size: 1.05rem;
}

.thanks-img {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin: 1rem auto;
}

/* Form */
.form-field {
    margin-bottom: 1rem;
}

.form-field+.form-field {
    margin-top: 1rem;
}

.form-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 700;
    color: orange;
    letter-spacing: .2px;
}

.form-error {
    margin-bottom: 1rem;
    padding: .5rem .75rem;
    color: #ffb4b4;
    background: rgba(255, 0, 0, .08);
    border: 1px solid rgba(255, 0, 0, .25);
    border-radius: 8px;
}

/* Inputs */
.form-input {
    width: 100%;
    padding: .7rem 1rem;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #ffe6c6;
    background-color: #111;
    border: 2px solid orange;
    border-radius: 10px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    caret-color: #ffa500;
}

.form-input::placeholder {
    color: #caa76f;
    opacity: .75;
}

.form-input:focus {
    outline: none;
    border-color: #ffa500;
    background-color: #101010;
    box-shadow: 0 0 0 4px rgba(255, 165, 0, .15);
}

/* Number input tweaks */
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-input[type=number] {
    -moz-appearance: textfield;
}

/* Autofill fix */
.form-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #111 inset !important;
    -webkit-text-fill-color: #ffe6c6 !important;
}

/* Radio */
.radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
}

.radio-pill {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .8rem;
    color: #e0e0e0;
    background: #111;
    border: 2px solid orange;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s, box-shadow .2s, transform .1s;
}

.radio-pill:hover {
    background: #161616;
    transform: translateY(-1px);
}

.radio-pill input {
    accent-color: orange;
}

.radio-pill:has(input:checked) {
    background: rgba(255, 165, 0, .08);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, .15) inset;
}

/* Checkbox */
.checkbox-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
    margin-top: .25rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #ccc;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid orange;
    border-radius: 3px;
    background-color: #111;
    display: inline-block;
    position: relative;
    transition: background-color .2s, border-color .2s;
}

.checkbox-label input[type="checkbox"]:checked+.custom-checkbox {
    background-color: orange;
    border-color: orange;
}

.custom-checkbox::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .2s;
}

.checkbox-label input[type="checkbox"]:checked+.custom-checkbox::after {
    opacity: 1;
}

/* Buttons */
.btn-primary,
.btn-link {
    display: inline-block;
    padding: .75rem 1rem;
    font-weight: 800;
    border: 2px solid orange;
    border-radius: 12px;
    color: orange;
    background: transparent;
    cursor: pointer;
    text-align: center;
    transition: background-color .2s, color .2s, transform .1s, border-color .2s;
}

.btn-primary {
    width: 100%;
}

.btn-primary:hover,
.btn-link:hover {
    background: orange;
    color: #111;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.btn-link {
    margin-top: 1rem;
    padding: .6rem 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .donate.content-tile {
        padding: 1.4rem 1rem;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }
}

/* Warning */
.donate-warning {
    margin-top: 1rem;
    padding: .75rem 1rem;
    background: rgba(255, 50, 0, .15);
    border: 2px solid rgba(255, 50, 0, .6);
    border-radius: 10px;
    color: #ff8080;
    font-weight: 700;
    text-align: center;
}