#rise-store-credit-banner-theme-app-extension {
    width: 100%;
    display: block;
    max-width: 100%;
    font-family: var(--store-credit-font-family-body, inherit);
}

/* Base text styling */
.rise-sb-fixed-text,
.rise-sb-truncatable-text,
.rise-sb-no-credit-hint,
.rise-sb-store-credit-button,
.rise-sb-text-link,
.rise-sb-checkmark {
    font-family: var(--store-credit-font-family-body, inherit);
    font-style: var(--store-credit-font-style-body, normal);
    font-weight: var(--store-credit-font-weight-normal, 400);
    line-height: normal;
    letter-spacing: var(--store-credit-letter-spacing, 0.42px);
    margin: 0;
    font-size: 14px;
    color: var(--store-credit-text-color);
}

/* Flex containers */
.rise-sb-store-credit-container,
.rise-sb-store-credit-content,
.rise-sb-balance-info,
.rise-sb-button-container {
    display: flex;
    align-items: center;
}

.rise-sb-store-credit-container {
    width: 100%;
    height: 34px;
    padding: 8px 0;
    justify-content: center;
    gap: 4px;
    align-self: stretch;
    box-sizing: border-box;
    background: var(--store-credit-background);
}

.rise-sb-store-credit-content {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
}

.rise-sb-balance-info {
    gap: 4px;
}

/* Text truncation */
.rise-sb-truncatable-text {
    max-width: 500px;
}

.rise-sb-store-credit-button,
.rise-sb-text-link {
    max-width: 350px;
}

.rise-sb-truncatable-text,
.rise-sb-store-credit-button,
.rise-sb-text-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rise-sb-no-credit-text {
    display: none;
}

.rise-sb-no-credit-hint {
    opacity: 0.8;
    font-size: 13px;
}

.rise-sb-button-container {
    gap: 4px;
    justify-content: flex-end;
}

.rise-sb-store-credit-button {
    padding: 8px 16px;
    background: #000;
    color: white;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
    min-width: 120px;
    text-align: center;
}

.rise-sb-button-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: rise-sb-spin 1s linear infinite;
    margin-left: 4px;
    vertical-align: middle;
}

.rise-sb-checkmark {
    font-family: monospace, sans-serif !important;
    margin: 0 0 0 4px;
    display: inline;
}

.rise-sb-text-link {
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    transition: color 0.2s, opacity 0.2s;
    text-align: right;
}

.rise-sb-text-link:hover {
    opacity: 0.8;
}

.rise-sb-text-link:disabled {
    opacity: 0.6;
    text-decoration: none;
}

.rise-sb-text-link .rise-sb-button-spinner {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--store-credit-text-color);
}

/* Skeleton loading */
.rise-sb-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.05);
}

.rise-sb-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.05) 30%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(0, 0, 0, 0.05) 70%,
            rgba(0, 0, 0, 0) 100%);
    background-size: 200% 100%;
    animation: rise-sb-skeleton-loading 2s infinite ease-in-out;
    z-index: 1;
}

.rise-sb-skeleton * {
    color: transparent !important;
    text-decoration: none !important;
    cursor: default !important;
    position: relative;
    z-index: 0;
}

/* Animations */
@keyframes rise-sb-spin {
    to { transform: rotate(360deg); }
}

@keyframes rise-sb-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile styles */
@media (max-width: 600px) {
    .rise-sb-store-credit-container {
        height: auto;
        min-height: 34px;
        padding: 8px 12px;
    }

    .rise-sb-store-credit-content {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        width: 100%;
    }

    .rise-sb-balance-info {
        width: 100%;
        justify-content: center;
        text-align: center;
        min-width: 0;
    }

    .rise-sb-text-link {
        font-size: 13px;
        max-width: 100%;
        text-align: center;
    }

    .rise-sb-no-credit-hint {
        font-size: 12px;
        text-align: center;
    }

    .rise-sb-store-credit-button {
        width: auto;
        min-width: 100px;
        max-width: 100%;
        font-size: 13px;
        padding: 6px 12px;
    }

    .rise-sb-button-container {
        width: 100%;
        justify-content: center;
    }
}

/* Very narrow screens */
@media (max-width: 320px) {
    .rise-sb-store-credit-container {
        padding: 8px 8px;
    }

    .rise-sb-store-credit-button {
        font-size: 12px;
        min-width: 80px;
        padding: 5px 10px;
    }
}