

/* Wrapper */
.first-only-panel{
    position: fixed;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

/* CARD */
.first-only-card{
    width: 270px;
    background: linear-gradient(
        180deg,
        rgba(12,39,82,.97),
        rgba(18,50,99,.95)
    );
    backdrop-filter: blur(18px);

    border-radius: 0 26px 26px 0;
    overflow: hidden;

    box-shadow:
        0 18px 45px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.08);

    transform-origin: left center;
    transition:
        transform .75s cubic-bezier(.22,1,.36,1),
        opacity .5s ease,
        width .65s cubic-bezier(.22,1,.36,1);

    position: relative;
}

/* CONTENT */
.first-only-content{
    padding: 26px 24px;
    color: #fff;
}

.first-only-label{
    color: #f58220;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.first-only-title{
    color: #f58220;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 12px;
}

.first-only-text{
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 18px;
}

/* CTA */
.first-only-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 42px;
    padding: 0 22px;

    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,.8);

    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;

    transition: .35s ease;
}

.first-only-btn:hover{
    background: #fff;
    color: #0d2c58;
    transform: translateY(-2px);
}

/* CLOSE */
.first-only-close{
    position: absolute;
    top: 12px;
    inset-inline-end: 14px;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 50%;

    background: transparent !important;
    color: #fff;

    cursor: pointer;
    font-size: 24px;

    transition: .25s ease;
    z-index:99999999;
    text-align:center;
    align-content:center;
}

.first-only-close:hover{
    background: transparent !important;
    transform: rotate(90deg);
}

/* MINI STATE */
.first-only-mini{
    position: absolute;
    inset-inline-start: -40px;
    top: 50%;

    transform:
        translateY(-50%)
        rotate(-90deg)
        scale(.92);

    transform-origin: center;

    background: linear-gradient(
        135deg,
        #f58220,
        #ff9b48
    );

    color: #fff;
    font-weight: 800;
    font-size: 15px;

    padding: 14px 24px;

    border-radius: 0 0 18px 18px;

    box-shadow:
        0 14px 30px rgba(0,0,0,.22);

    opacity: 0;
    pointer-events: none;

    transition:
        transform .65s cubic-bezier(.22,1,.36,1),
        opacity .45s ease;
}

.first-only-mini span{
    white-space: nowrap;
}

/* OPEN STATE */
.first-only-panel.active .first-only-card{
    transform:
        translateX(0)
        scale(1);
    opacity: 1;
}

.first-only-panel.active .first-only-mini{
    opacity: 0;
    pointer-events: none;
}

/* CLOSED STATE */
.first-only-panel:not(.active) .first-only-card{
    transform:
        translateX(-88%)
        scale(.88);

    opacity: .25;
}

.first-only-panel:not(.active) .first-only-mini{
    opacity: 1;
    pointer-events: auto;

    transform:
        translateY(-50%)
        rotate(-90deg)
        scale(1);
}

/* stagger animation */
.animate-item{
    opacity: 0;
    transform: translateX(-18px);
}

.first-only-panel.active .animate-item{
    animation: itemReveal .7s forwards;
}

.first-only-panel.active .animate-item:nth-child(1){
    animation-delay: .15s;
}
.first-only-panel.active .animate-item:nth-child(2){
    animation-delay: .25s;
}
.first-only-panel.active .animate-item:nth-child(3){
    animation-delay: .35s;
}
.first-only-panel.active .animate-item:nth-child(4){
    animation-delay: .45s;
}

@keyframes itemReveal{
    from{
        opacity: 0;
        transform: translateX(-18px);
    }
    to{
        opacity: 1;
        transform: translateX(0);
    }
}

/* MOBIL */
@media(max-width:768px){

    .first-only-card{
        width: 220px;
    }

    .first-only-content{
        padding: 22px 18px;
    }

    .first-only-title{
        font-size: 24px;
    }

    .first-only-text{
        font-size: 15px;
    }

    .first-only-mini{
        inset-inline-start: -40px;
        font-size: 13px;
        padding: 12px 20px;
    }

    .first-only-panel:not(.active) .first-only-card{
        transform:
            translateX(-83%)
            scale(.9);
    }
}
