/* M-Pesa checkout field — shared by the classic and block checkouts. */
.sm-mpesa-box,
.sm-mpesa-payment-method {
    --sm-mpesa-accent: #e60000;
    --sm-mpesa-accent-soft: rgba(230, 0, 0, 0.08);
    --sm-mpesa-border: #d9dce1;
    --sm-mpesa-text: #1d2127;
    --sm-mpesa-muted: #6b7280;
    --sm-mpesa-surface: #ffffff;
    --sm-mpesa-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--sm-mpesa-text);
    font-size: 15px;
    line-height: 1.5;
}

.sm-mpesa-box {
    padding: 4px 0;
}

.sm-mpesa-box__desc p,
.sm-mpesa-description {
    margin: 0;
    color: var(--sm-mpesa-muted);
}

.sm-mpesa-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff4e5;
    color: #9a5b00;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sm-mpesa-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.sm-mpesa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-mpesa-field__label {
    font-weight: 600;
    font-size: 14px;
}

.sm-mpesa-field__label .required {
    color: var(--sm-mpesa-accent);
    text-decoration: none;
    border: 0;
}

.sm-mpesa-field__group {
    display: flex;
    align-items: stretch;
    min-height: 50px;
    border: 1.5px solid var(--sm-mpesa-border);
    border-radius: var(--sm-mpesa-radius);
    background: var(--sm-mpesa-surface);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sm-mpesa-field__group:focus-within {
    border-color: var(--sm-mpesa-accent);
    box-shadow: 0 0 0 4px var(--sm-mpesa-accent-soft);
}

.sm-mpesa-field.is-invalid .sm-mpesa-field__group {
    border-color: #d63638;
}

.sm-mpesa-field.is-valid .sm-mpesa-field__group {
    border-color: #1a7f37;
}

.sm-mpesa-field__prefix {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 0 14px;
    border-right: 1px solid var(--sm-mpesa-border);
    background: #f6f7f9;
    color: var(--sm-mpesa-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sm-mpesa-field__prefix svg {
    color: var(--sm-mpesa-accent);
}

.sm-mpesa-box input.sm-mpesa-field__input,
.sm-mpesa-payment-method input.sm-mpesa-field__input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0 14px;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
    outline: none;
    color: var(--sm-mpesa-text);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.sm-mpesa-field__input::placeholder {
    color: #a3a8b0;
    font-weight: 400;
}

.sm-mpesa-field__input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.sm-mpesa-field__hint {
    margin: 0;
    color: var(--sm-mpesa-muted);
    font-size: 13px;
}

.sm-mpesa-field.is-invalid .sm-mpesa-field__hint {
    color: #d63638;
}

/* Payment method label (blocks) */
.sm-mpesa-payment-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Dark themes */
.has-dark-controls .sm-mpesa-payment-method,
.is-dark-theme .sm-mpesa-payment-method {
    --sm-mpesa-border: #3c4048;
    --sm-mpesa-text: #f2f3f5;
    --sm-mpesa-muted: #a3a8b0;
    --sm-mpesa-surface: #1e1f22;
}

.has-dark-controls .sm-mpesa-field__prefix,
.is-dark-theme .sm-mpesa-field__prefix {
    background: #26282c;
}
