/* Extends shop.css (colours come from its variables). shop.css sets display on .payment-form and .form-row,
   which would override the hidden attribute. */
[hidden] {
    display: none !important;
}

.stmb-warning,
.stmb-error {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: var(--shop-radius);
    font-size: 14px;
}

.stmb-warning {
    border: 1px solid #d4a72c;
    background: #fff8c5;
}

.stmb-error {
    border: 1px solid #cf222e;
    background: #ffebe9;
}

.stmb-form {
    max-width: 440px;
}

/* Labels above the fields: the API key (32 characters) needs the full width. */
.stmb-form .form-row {
    grid-template-columns: 1fr;
    gap: 4px;
}

.stmb-help {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: 12px 0 0;
    padding: 10px 16px;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    background: var(--shop-surface);
    font-size: 14px;
}

.stmb-help summary {
    font-weight: 600;
    cursor: pointer;
}

.stmb-help ol {
    margin: 10px 0 2px;
    padding-left: 20px;
}

.stmb-help li + li {
    margin-top: 6px;
}

@media (min-width: 1000px) {
    .shop-layout .stmb-form {
        width: 440px;
    }
}

/* Name, email and phone are prefilled; collapsed to keep the form short. */
.stmb-details {
    padding: 10px 14px;
    border: 1px solid var(--shop-border);
    border-radius: 6px;
}

.stmb-details summary {
    color: var(--shop-muted);
    font-size: 14px;
    cursor: pointer;
}

.stmb-details[open] summary {
    margin-bottom: 14px;
}

.stmb-details .form-row + .form-row {
    margin-top: 14px;
}

.stmb-details[open] .stmb-details-summary {
    display: none;
}

.stmb-details-summary {
    margin-left: 6px;
    color: var(--shop-text);
}

/* Max amount and amount side by side; amount takes the row when max amount is hidden (PAY). */
.stmb-pair {
    display: flex;
    gap: 12px;
}

.stmb-pair .form-row {
    flex: 1;
    min-width: 0;
}

/* Keys and ids are easier to read and compare in a monospace font. */
.stmb-mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
    font-size: 14px;
}

.stmb-inline {
    display: flex;
    gap: 8px;
}

.stmb-primary,
.stmb-secondary {
    padding: 10px 16px;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.stmb-primary {
    margin-top: 8px;
    border: 1px solid var(--shop-accent);
    background: var(--shop-accent);
    color: #ffffff;
}

.stmb-secondary {
    border: 1px solid var(--shop-border);
    background: var(--shop-surface);
    color: var(--shop-text);
    white-space: nowrap;
}

.stmb-secondary:hover:not(:disabled) {
    border-color: var(--shop-muted);
}

.stmb-inline .stmb-secondary {
    padding: 4px 10px;
    font-size: 13px;
}

.stmb-primary:disabled,
.stmb-secondary:disabled {
    cursor: default;
    opacity: 0.5;
}
