/* Селекторы с form.atp — чтобы перебить стили темы для полей и кнопок. */
.atp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}
form.atp {
    display: flex;
    flex-direction: column;
    max-width: 460px;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #dcdfe4;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}
.atp-grid form.atp {
    max-width: none;
    margin: 0;
}
form.atp .atp-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}
form.atp .atp-sum {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
}
form.atp .atp-field {
    display: block;
    margin: 0 0 14px;
}
form.atp .atp-field[hidden] {
    display: none;
}
form.atp .atp-field span {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #555;
}
form.atp .atp-field input,
form.atp .atp-field select {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c3c7cf;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    box-sizing: border-box;
}
form.atp .atp-field input:focus,
form.atp .atp-field select:focus {
    border-color: #8a6d1b;
    outline: 2px solid rgba(236, 197, 95, .45);
}
/* Кнопка прижата к низу — у блоков разной высоты кнопки на одной линии. */
form.atp button.atp-btn {
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    color: #2b2410;
    font-weight: 700;
    cursor: pointer;
}
form.atp button.atp-btn[disabled] {
    opacity: .6;
    cursor: default;
}
.atp-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}
.atp-note--ok {
    background: #e6f4ea;
    color: #1a7f37;
}
form.atp .atp-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b6b6b;
}
form.atp .atp-hint a {
    color: inherit;
    text-decoration: underline;
}
.atp-note--err {
    background: #fdecea;
    color: #b3261e;
}
form.atp .atp-hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
/* Оплата по QR: основная кнопка — QR, карта — второй, прозрачной кнопкой. */
form.atp button.atp-btn--alt {
    margin-top: 8px;
    background: transparent;
    border: 1px solid currentColor;
    font-weight: 600;
}
form.atp .atp-qr {
    margin-top: 14px;
    text-align: center;
}
form.atp .atp-qr[hidden] {
    display: none;
}
form.atp .atp-qr__sum {
    margin: 0 0 10px;
    font-weight: 700;
}
form.atp .atp-qr__img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin: 10px auto 6px;
    background: #fff;
}
form.atp a.atp-qr__app {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 6px;
    background: #1d1d1f;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
form.atp .atp-qr__tip,
form.atp .atp-qr__wait,
form.atp .atp-qr__status {
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b6b6b;
}
/* На компьютере кнопка «в приложении» не нужна, на телефоне код с того же экрана не отсканировать. */
@media (hover: hover) and (pointer: fine) {
    form.atp a.atp-qr__app { display: none; }
}
@media (hover: none), (pointer: coarse) {
    form.atp .atp-qr__img { width: 160px; }
}
