/* BD Insert */
.bd-php-banner {
    width: 100%;
    max-width: 920px;
    height: 71px;
    margin: 20px auto;
    padding: 0 12px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.4fr) auto;
    align-items: center;
    gap: 15px;

    position: relative;
    overflow: hidden;

    border: 1px solid #30363d;
    border-radius: 9px;

    background:
        linear-gradient(
            110deg,
            #151a21 0%,
            #1d2530 50%,
            #151a21 100%
        );

    color: #f0f6fc;
    text-decoration: none;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;

    box-shadow: 0 4px 16px rgba(0,0,0,.24);

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}


/* Decorazione di sfondo */

.bd-php-banner::before {
    content: "";
    position: absolute;

    width: 210px;
    height: 210px;

    right: 7%;
    top: -125px;

    border-radius: 50%;

    background: rgba(255,255,255,.035);

    pointer-events: none;
}


/* Hover */

.bd-php-banner:hover {
    transform: translateY(-2px);
    border-color: #58a6ff;
    box-shadow: 0 7px 22px rgba(0,0,0,.32);
}


/* =========================================================
   SINISTRA
========================================================= */

.bd-php-banner-brand {
    min-width: 0;

    display: flex;
    align-items: center;

    position: relative;
    z-index: 3;
}


.bd-php-banner-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    margin-right: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: #21262d;
    border: 1px solid #30363d;

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    letter-spacing: -1px;
}


.bd-php-banner-title {
    min-width: 0;

    color: #d7ff3f;

    font-size: 15px;
    font-weight: 900;

    line-height: 18px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   CENTRO DESKTOP
========================================================= */

.bd-php-banner-message {
    width: 100%;
    height: 30px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    text-align: center;

    z-index: 3;
}


.bd-php-banner-message span {
    position: absolute;

    left: 0;
    right: 0;

    top: 50%;

    width: 100%;

    transform:
        translateY(calc(-50% + 8px));

    opacity: 0;

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    line-height: 22px;

    white-space: nowrap;

    transition:
        opacity .7s ease,
        transform .7s ease;

    pointer-events: none;
}


.bd-php-banner-message span.active {
    opacity: 1;

    transform:
        translateY(-50%);
}


/* =========================================================
   PULSANTE
========================================================= */

.bd-php-banner-button {
    justify-self: end;

    position: relative;
    z-index: 5;

    flex: 0 0 auto;

    padding: 9px 14px;

    border-radius: 6px;

    background: #238636;

    border: 1px solid rgba(240,246,252,.12);

    color: #ffffff;

    font-size: 15px;
    font-weight: 900;

    line-height: 19px;

    white-space: nowrap;

    box-shadow: 0 2px 7px rgba(0,0,0,.2);

    transition:
        background .2s ease,
        transform .2s ease;
}


.bd-php-banner:hover .bd-php-banner-button {
    background: #2ea043;

    transform: translateX(1px);
}


.bd-php-banner-arrow {
    margin-left: 6px;

    font-size: 16px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 820px) {

    .bd-php-banner {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(250px, 1.3fr)
            auto;

        gap: 10px;
    }


    .bd-php-banner-title {
        font-size: 14px;
    }


    .bd-php-banner-message span {
        font-size: 13px;
    }


    .bd-php-banner-button {
        font-size: 14px;
        padding: 8px 12px;
    }
}


/* =========================================================
   MOBILE
   PRIMA RIGA = LOGO + TITOLO + PULSANTE
   SECONDA RIGA = MESSAGGIO CENTRATO
========================================================= */

@media (max-width: 650px) {

    .bd-php-banner {

        width: 100%;

        height: 82px;

        padding: 7px 9px;

        display: grid;

        grid-template-columns: 1fr auto;

        grid-template-rows: 40px 27px;

        column-gap: 8px;
        row-gap: 2px;

        align-items: center;
    }


    /* -----------------------------------------------------
       BLOCCO LOGO + TITOLO
    ----------------------------------------------------- */

    .bd-php-banner-brand {

        grid-column: 1;

        grid-row: 1;

        width: 100%;
        height: 40px;

        min-width: 0;

        display: flex;
        align-items: center;
    }


    /* LOGO PHP SEMPRE VISIBILE */

    .bd-php-banner-icon {

        display: flex;

        width: 35px;
        height: 35px;

        flex: 0 0 35px;

        margin-right: 8px;

        font-size: 12px;
    }


    .bd-php-banner-title {

        min-width: 0;

        font-size: 13px;
        line-height: 17px;

        color: #d7ff3f;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* -----------------------------------------------------
       PULSANTE - PRIMA RIGA
    ----------------------------------------------------- */

    .bd-php-banner-button {

        grid-column: 2;

        grid-row: 1;

        justify-self: end;

        align-self: center;

        position: relative;

        right: auto;
        top: auto;

        margin: 0;

        transform: none;

        padding: 9px 10px;

        font-size: 13px;
        line-height: 17px;
    }


    .bd-php-banner:hover .bd-php-banner-button {

        transform: none;
    }


    /* -----------------------------------------------------
       MESSAGGIO - RIGA COMPLETAMENTE SEPARATA
    ----------------------------------------------------- */

    .bd-php-banner-message {

        grid-column: 1 / 3;

        grid-row: 2;

        width: 100%;
        height: 27px;

        min-width: 0;

        position: relative;

        display: flex;

        align-items: center;
        justify-content: center;

        overflow: hidden;

        text-align: center;

        z-index: 3;
    }


    .bd-php-banner-message span {

        position: absolute;

        left: 0;
        right: 0;

        top: 50%;

        width: 100%;

        transform:
            translateY(calc(-50% + 7px));

        color: #ffffff;

        font-size: 13px;

        font-weight: 900;

        line-height: 21px;

        text-align: center;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;

        transition:
            opacity .7s ease,
            transform .7s ease;
    }


    .bd-php-banner-message span.active {

        opacity: 1;

        transform:
            translateY(-50%);
    }
}


/* =========================================================
   SMARTPHONE
========================================================= */

@media (max-width: 480px) {

    .bd-php-banner {

        height: 82px;

        padding: 7px 8px;

        grid-template-rows: 39px 28px;
    }


    .bd-php-banner-icon {

        width: 32px;
        height: 32px;

        flex-basis: 32px;

        margin-right: 7px;

        font-size: 11px;
    }


    .bd-php-banner-title {

        font-size: 12px;

        line-height: 16px;
    }


    .bd-php-banner-button {

        padding: 8px 9px;

        font-size: 12px;

        line-height: 17px;
    }


    .bd-php-banner-message {

        height: 28px;
    }


    .bd-php-banner-message span {

        font-size: 12px;

        line-height: 21px;
    }


    .bd-php-banner-arrow {

        margin-left: 4px;

        font-size: 14px;
    }
}


/* =========================================================
   TELEFONI MOLTO STRETTI
========================================================= */

@media (max-width: 380px) {

    .bd-php-banner {

        height: 84px;

        grid-template-rows: 39px 30px;
    }


    .bd-php-banner-icon {

        width: 30px;
        height: 30px;

        flex-basis: 30px;

        margin-right: 6px;

        font-size: 10px;
    }


    .bd-php-banner-title {

        font-size: 11px;
    }


    .bd-php-banner-button {

        padding: 8px 7px;

        font-size: 11px;
    }


    .bd-php-banner-message span {

        font-size: 11px;

        line-height: 22px;
    }
}