/**
 * Piranha PayPal Restrictions – promotional banner styles
 */

.piranha-paypal-messaging {
    --pp-blue: #003087;
    --pp-blue-bright: #0070e0;
    --pp-bg: #ffffff;
    --pp-border: #009cde;
    box-sizing: border-box;
    width: 100%;
    margin: 0.55rem 0;
    padding: 0.55rem 0.8rem;
    background: var(--pp-bg);
    border: 1px solid rgba(0, 156, 222, 0.4);
    border-radius: 6px;
    color: #1a1a1a;
}

.piranha-paypal-messaging[hidden],
.piranha-paypal-checkout-notice[hidden] {
    display: none !important;
}

.piranha-paypal-messaging--full_width {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
}

.piranha-paypal-messaging--compact {
    padding: 0.5rem 0.7rem;
    margin: 0.55rem 0;
}

.piranha-paypal-messaging--homepage {
    background: #ffffff;
    border-color: var(--pp-border);
}

/* Product page */
.piranha-paypal-messaging--product,
.product-info-main .piranha-paypal-messaging {
    margin: 0.5rem 0 0.7rem;
    padding: 0.55rem 0.8rem;
}

/* Sidebar: compact by default; one thin line on mobile */
.piranha-paypal-messaging--sidebar,
.sidebar .piranha-paypal-messaging--sidebar,
.sidebar-additional .piranha-paypal-messaging--sidebar {
    display: block !important;
    visibility: visible !important;
    max-width: 100%;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(0, 156, 222, 0.4);
    border-left: 3px solid var(--pp-blue-bright);
    margin: 0.55rem 0 0.7rem;
    background: #ffffff;
    border-radius: 4px;
    box-sizing: border-box;
    clear: both;
    position: relative;
    z-index: 2;
    min-height: 0;
    line-height: 1.2;
}

.pp-banner,
.piranha-paypal-messaging__content .pp-banner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    min-height: 0;
}

.pp-banner--inline {
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
}

.pp-banner--inline .pp-banner__text,
.pp-banner--sidebar .pp-banner__text {
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1a1a1a;
}

.pp-banner--sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.pp-banner--sidebar .pp-banner__text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.875rem;
    line-height: 1.25;
}

.pp-banner__logo-img {
    display: block;
    flex: 0 0 auto;
    height: 22px;
    width: auto;
    max-width: 80px;
}

.pp-banner__brand {
    flex: 0 0 auto;
}

.pp-banner__logo {
    display: inline-block;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--pp-blue);
    line-height: 1.2;
}

.pp-banner__logo span {
    color: var(--pp-blue-bright);
}

.pp-banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

.pp-banner__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pp-blue);
    line-height: 1.2;
}

.pp-banner__text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.25;
    color: #333;
}

.pp-banner__actions {
    flex: 0 0 auto;
}

.pp-banner__cta {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    background: var(--pp-blue);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.pp-banner__cta:hover,
.pp-banner__cta:focus {
    background: var(--pp-blue-bright);
    color: #fff !important;
}

/* Listing / search badge under price */
.piranha-paypal-listing {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    margin: 0.3rem 0 0.4rem;
    padding: 0.35rem 0.45rem;
    line-height: 1.2;
    color: #003087;
    background: #ffffff;
    border: 1px solid rgba(0, 156, 222, 0.4);
    border-radius: 4px;
    box-sizing: border-box;
}

.piranha-paypal-listing__logo {
    display: block;
    height: 12px;
    width: auto;
    flex: 0 0 auto;
    margin-top: 1px;
}

.piranha-paypal-listing__text {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
    color: #333;
}

.piranha-paypal-checkout-notice {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    background: #fff8e6;
    border: 1px solid #e0c56e;
    border-radius: 4px;
    color: #333;
    font-size: 0.95rem;
}

/* Hide Magento official Pay Later SDK banners when custom messaging is used */
.pay-later-message,
[data-pp-message]:empty {
    display: none !important;
}

@media (max-width: 767px) {
    .piranha-paypal-messaging {
        padding: 0.4rem 0.55rem;
        margin: 0.4rem 0;
        background: #ffffff;
    }

    .piranha-paypal-messaging--sidebar,
    .sidebar .piranha-paypal-messaging--sidebar,
    .sidebar-additional .piranha-paypal-messaging--sidebar {
        padding: 0.3rem 0.5rem;
        margin: 0.4rem 0 0.55rem;
        border-left-width: 2px;
        border-radius: 3px;
        background: #ffffff;
    }

    .pp-banner--inline,
    .pp-banner--sidebar {
        flex-wrap: wrap;
        white-space: normal;
        gap: 0.3rem 0.4rem;
    }

    .pp-banner--inline .pp-banner__text,
    .pp-banner--sidebar .pp-banner__text {
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.25;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
    }

    .pp-banner__logo-img {
        height: 16px;
        max-width: 58px;
    }

    .piranha-paypal-listing {
        padding: 0.3rem 0.4rem;
    }

    .piranha-paypal-listing__text {
        font-size: 11px;
    }

    .piranha-paypal-listing__logo {
        height: 11px;
    }
}
