.bpw-widget {
    --bpw-accent: var(--bpw-accent, #0a3d62);
    --bpw-accent-2: color-mix(in srgb, var(--bpw-accent) 70%, #000 30%);
    --bpw-bg: #ffffff;
    --bpw-border: #e1e6ec;
    --bpw-text: #1b2a3a;
    --bpw-muted: #6b7a8c;
    --bpw-error: #c0392b;
    --bpw-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--bpw-text);
    max-width: 480px;
    margin: 12px 0;
}

.bpw-description {
    font-size: 14px;
    color: var(--bpw-muted);
    margin: 0 0 14px;
}

.bpw-card {
    position: relative;
    background: linear-gradient(135deg, var(--bpw-accent) 0%, var(--bpw-accent-2) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 12px 28px rgba(10, 61, 98, 0.25);
    aspect-ratio: 1.6 / 1;
    max-width: 360px;
    margin: 0 auto 18px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.bpw-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% -20%, rgba(255, 255, 255, 0.18), transparent 60%);
    pointer-events: none;
}

.bpw-card-chip {
    width: 38px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f3d57a, #b8902c);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.bpw-card-brand {
    position: absolute;
    top: 22px;
    right: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.9;
}

.bpw-card-number {
    margin-top: 36px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 20px;
    letter-spacing: 2px;
}

.bpw-card-row {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    text-transform: uppercase;
    font-size: 12px;
}

.bpw-card-label {
    display: block;
    opacity: 0.7;
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.bpw-card-name,
.bpw-card-exp {
    font-weight: 600;
    letter-spacing: 1px;
}

.bpw-card-exp-wrap {
    text-align: right;
}

.bpw-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.bpw-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bpw-muted);
    letter-spacing: 0.3px;
}

.bpw-input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--bpw-border);
    background: var(--bpw-bg);
    border-radius: var(--bpw-radius);
    font-size: 15px;
    color: var(--bpw-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.bpw-input:focus {
    outline: none;
    border-color: var(--bpw-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bpw-accent) 18%, transparent);
}

.bpw-input.is-invalid {
    border-color: var(--bpw-error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.bpw-row {
    display: flex;
    gap: 12px;
}

.bpw-field-half {
    flex: 1;
}

.bpw-error {
    min-height: 0;
    font-size: 13px;
    color: var(--bpw-error);
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: var(--bpw-radius);
    padding: 0 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
}

.bpw-error.is-visible {
    max-height: 120px;
    opacity: 1;
    padding: 10px 12px;
}

.bpw-supported {
    font-size: 12px;
    color: var(--bpw-muted);
    margin: 6px 0 0;
}

.bpw-country-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bpw-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f4f7fa;
    border: 1px solid var(--bpw-border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--bpw-text);
}

.bpw-flag {
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 480px) {
    .bpw-card {
        max-width: 100%;
    }
    .bpw-card-number {
        font-size: 18px;
    }
}
