/*
 * WooCommerce Product Limit Payment Gateways - Stylesheet
 * Developed by Toroobche
 *
 * Visual language matches Toroobche's real brand identity: dark near-black
 * surface (#0b0c10) with brand red (#E63946) as the single accent, taken
 * directly from the brand's own CSS variables. A dark, red-accented card also
 * reads correctly as "restricted / can't do this" — much clearer than a pale
 * informational box — which is the point of this notice in the first place.
 * Font stack prefers Vazirmatn (open-licensed) rather than Toroobche's own
 * commercial site font, which isn't cleared for redistribution inside a
 * resold plugin.
 *
 * Every color is read from a CSS custom property whose fallback is the stock
 * look; MessageColors emits only the ones an admin changed in settings.
 */

.trx-alert-box {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--trx-alert-bg, #14161b) 0%, var(--trx-alert-bg-end, #1f2833) 100%);
    padding: 18px 24px 18px 20px;
    margin-bottom: 28px;
    border-radius: 16px;
    color: var(--trx-alert-title, #f2f2f3);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    box-shadow: 0 12px 32px rgba(11, 12, 16, 0.22);
    direction: rtl;
}

.trx-alert-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--trx-alert-accent, #E63946), var(--trx-alert-accent-end, #c42b37));
}

.trx-alert-box .trx-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--trx-alert-accent-soft, rgba(230, 57, 70, 0.16));
    color: var(--trx-alert-icon, #ff6b74);
}

.trx-alert-box svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.trx-alert-box .trx-alert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.trx-alert-box .trx-alert-title {
    color: var(--trx-alert-title, #fff);
    font-weight: 600;
}

.trx-alert-box .trx-alert-desc {
    color: var(--trx-alert-desc, #b7b9bd);
    font-size: 12.5px;
    line-height: 1.8;
}

.trx-alert-box .trx-alert-nudge {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--trx-alert-accent-soft, rgba(230, 57, 70, 0.16));
    border: 1px solid var(--trx-nudge-border, rgba(230, 57, 70, 0.4));
    color: var(--trx-nudge-text, #ff8b92);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}

.trx-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: var(--trx-badge-bg, #E63946);
    color: var(--trx-badge-text, #fff);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
    margin-right: 5px;
    vertical-align: middle;
    /* Admin-written text can be long; wrap instead of overflowing narrow (mobile) cart rows. */
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.6;
    box-shadow: 0 3px 10px var(--trx-badge-shadow, rgba(230, 57, 70, 0.28));
}

/* Custom-checkout themes: notice placed above their cart list and payment options */
.trx-universal-alert {
    margin: 0 0 16px;
}
.trx-universal-alert .trx-alert-box {
    margin: 0;
}
.trx-universal-badge {
    display: inline-flex;
    align-self: flex-start;
    justify-self: start;
    width: auto;
    max-width: 100%;
    margin: 6px 0 0;
    font-size: 11px;
}

/* Badge in a corner of the product image (listings and single product) */
.trx-image-badge-wrap {
    position: relative;
    display: block;
}
.wc-block-components-product-image,
.woocommerce-product-gallery,
ul.products li.product {
    position: relative;
}
.trx-image-badge {
    position: absolute;
    z-index: 9;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 20px);
    padding: 5px 12px;
    border-radius: 999px;
    background-color: var(--trx-image-badge-bg, #E63946);
    color: var(--trx-image-badge-text, #fff);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 10px var(--trx-image-badge-shadow, rgba(230, 57, 70, 0.28));
    pointer-events: auto;
    direction: rtl;
}
.trx-image-badge--top-right { top: 10px; right: 10px; }
.trx-image-badge--top-left { top: 10px; left: 10px; }
.trx-image-badge--bottom-right { bottom: 10px; right: 10px; }
.trx-image-badge--bottom-left { bottom: 10px; left: 10px; }
.trx-image-badge--single {
    font-size: 12.5px;
    padding: 6px 14px;
}
.woocommerce-product-gallery .woocommerce-product-gallery__image:first-child {
    position: relative;
}
