.paymenthood-profiles-container {
    margin-bottom: 40px;
}

/* Applied when a PaymentHood payment is in-flight for this invoice */
.paymenthood-credit-blocked {
    display: none !important;
}

/* Applied to payment method options when switching is locked */
.paymenthood-method-locked {
    pointer-events: none !important;
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.paymenthood-method-locked-notice {
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
}

.paymenthood-profiles-title {
    /* Styles handled by alert alert-info classes from theme */
    margin-bottom: 12px;
    font-weight: 600;
}

.paymenthood-profiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, max-content));
    justify-content: center;
    gap: 10px;
}

.paymenthood-profile-item {
    background: white;
    border: 1px #ccc solid;
    border-radius: 20px;
    padding: 0 10px;
    cursor: default;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

.paymenthood-profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.paymenthood-profile-icon {
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.paymenthood-profile-icon img {
    height: 19px;
}

/* Built-in card icon, shown when no artwork comes back from the API. */
.paymenthood-profile-icon svg.paymenthood-builtin-card {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Built-in card icon, shown when no artwork comes back from the API. */
.paymenthood-profile-icon svg.paymenthood-builtin-card {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.paymenthood-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.paymenthood-profile-type {
    font-size: 11px;
    color: #666;
    display: none;
}

.paymenthood-profiles-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
    /* Prevent layout shift during loading if possible */
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Delay showing loading text to avoid flash on fast connections/cache */
    opacity: 0;
    animation: paymenthood-fade-in 0.3s ease 0.15s forwards;
}

.paymenthood-profiles-error {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

/* Ensure our own content fades in smoothly - but only on first appearance */
.paymenthood-profiles-container:not(.paymenthood-animated),
#paymenthood-checkout-message:not(.paymenthood-animated) {
    animation: paymenthood-fade-in 0.3s ease-out;
}

/* Mark as animated to prevent re-triggering on subsequent shows */
.paymenthood-profiles-container.paymenthood-animated,
#paymenthood-checkout-message.paymenthood-animated {
    /* No animation on subsequent shows */
}

@keyframes paymenthood-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/******* For lagom-futuristic theme *******/
.lagom-futuristic .paymenthood-profiles-container {
    margin-bottom: 0;
}
.lagom-futuristic #paymenthood-section{
    padding: 20px;
    background: var(--ui-block-bg-form);
    margin-bottom: var(--ui-block-spacing-lg);
    border: var(--panel-border);
    border-radius: var(--panel-border-radius);
    box-shadow: var(--panel-box-shadow);
}
.lagom-futuristic .paymenthood-profile-item{
    border: none;
}
.lagom-futuristic .paymenthood-profiles-loading{
    color: white !important;
}
.lagom-futuristic .paymenthood-profiles-list {
    justify-content: start;
}