/* Purchase controls shared by the authenticated proxy catalog. */
.proxy-buy-card {
    position: relative;
    overflow: visible;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #111;
}

.proxy-buy-card:has(.geo-select.open) {
    z-index: 30;
}

.proxy-buy-card h2 {
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #d8d8d8;
    background: #f2f2f2;
    text-align: center;
    font-size: 19px;
    line-height: 1.15;
}

.proxy-buy-card p {
    margin: 0;
    padding: 10px 14px;
    color: #777;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid #e2e2e2;
}

.proxy-buy-card p strong,
.proxy-buy-card p b {
    color: #111;
}

.buy-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    min-height: 48px;
    padding: 0;
    border-bottom: 1px solid #e2e2e2;
}

.buy-row.double {
    grid-template-columns: 110px minmax(0, 1fr) 104px minmax(0, 1fr);
}

.buy-row label {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    border-right: 1px solid #e2e2e2;
}

.buy-row.double label:nth-of-type(2) {
    border-left: 1px solid #e2e2e2;
}

.buy-row input,
.buy-row select {
    width: auto;
    height: 34px;
    margin: 7px 10px;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 14px;
}

.buy-row .geo-select {
    margin: 7px 10px;
}

.geo-select {
    position: relative;
    z-index: 5;
}

.geo-select-current,
.geo-option {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: #111;
    text-align: left;
    cursor: pointer;
}

.geo-select-current {
    grid-template-columns: 26px minmax(0, 1fr) auto 12px;
}

.geo-select-current::after {
    content: "";
    width: 0;
    height: 0;
    justify-self: end;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #6b7c92;
}

.geo-select-current strong,
.geo-option strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 400;
}

.geo-select-current img,
.geo-option img {
    width: 20px;
    height: 14px;
    display: block;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.geo-select-current small,
.geo-option small {
    min-width: 30px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #58bd54;
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.geo-select-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: 270px;
    overflow-y: auto;
    border: 1px solid #cfd5dd;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

.geo-select.open .geo-select-menu {
    display: block;
}

.geo-option {
    border: 0;
    border-bottom: 1px solid #edf0f3;
}

.geo-option:hover {
    background: #0b8fcb;
    color: #fff;
}

.price-row strong {
    margin: 0 10px;
    font-size: 17px;
}

.proxy-buy-card .buy-submit {
    width: calc(100% - 32px);
    min-height: 38px;
    margin: 11px 16px 13px;
    border: 0;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.proxy-buy-card .buy-submit:hover {
    background: var(--brand-dark);
}

.account-buy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.account-buy-card {
    overflow: visible;
    border-color: var(--border);
    border-radius: 8px;
    box-shadow: none;
}

.account-buy-card .buy-row {
    grid-template-columns: 87px minmax(0, 1fr);
    min-height: 44px;
}

.account-buy-card .buy-row.double {
    grid-template-columns: 87px minmax(72px, .75fr) 72px minmax(112px, 1fr);
}

.account-buy-card .buy-row label {
    font-size: 13px;
}

.account-buy-card .buy-row input,
.account-buy-card .buy-row select {
    width: calc(100% - 16px);
    min-width: 0;
    margin: 6px 8px;
    border-radius: 6px;
}

.account-buy-card .geo-select {
    min-width: 0;
    width: auto;
}

.account-buy-card .geo-select-current,
.account-buy-card .geo-option {
    gap: 8px;
    min-height: 38px;
    border-radius: 6px;
}

.account-buy-card .geo-select-current {
    grid-template-columns: 24px minmax(0, 1fr) auto 12px;
}

.account-buy-card .geo-option {
    grid-template-columns: 24px minmax(0, 1fr) auto;
}

.account-buy-card .geo-select-current strong,
.account-buy-card .geo-option strong {
    min-width: 0;
    white-space: nowrap;
}

.account-buy-card .geo-select-current small,
.account-buy-card .geo-option small {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .buy-row,
    .buy-row.double,
    .account-buy-grid {
        grid-template-columns: 1fr;
    }

    .buy-row label,
    .buy-row.double label:nth-of-type(2) {
        min-height: 42px;
        border-left: 0;
        border-right: 0;
        border-bottom: 1px solid #e2e2e2;
    }
}
