.smart-biz-card[hidden] {
    display: none;
}

.smart-biz-card {
    position: fixed;
    top: 54%;
    right: 14px;
    bottom: auto;
    z-index: 998;
    width: min(320px, calc(100vw - 28px));
    max-height: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 82% 8%, rgba(72, 177, 204, 0.24), transparent 38%),
        linear-gradient(145deg, rgba(5, 47, 63, 0.9), rgba(5, 31, 45, 0.86));
    box-shadow: 0 22px 52px rgba(6, 21, 31, 0.28), 0 7px 18px rgba(5, 17, 27, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    opacity: 0;
    transform: translate3d(18px, -50%, 0) scale(0.98);
    transition: opacity 240ms ease, transform 240ms ease, width 240ms ease;
}

.smart-biz-card.is-visible {
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1);
}

/* Expanded card must never use vertical-center transform (clips top under header) */
.smart-biz-card.is-visible:not(.is-collapsed) {
    transform: translate3d(0, 0, 0) scale(1);
}

.smart-biz-card:hover,
.smart-biz-card:focus-within {
    opacity: 1;
}

.smart-biz-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 24, 35, 0.2), rgba(2, 19, 30, 0.48));
    pointer-events: none;
    z-index: 0;
}

.smart-biz-card__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(5, 31, 45, 0.35);
    border-radius: 50%;
    color: #0f2a38;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.smart-biz-card__close:hover,
.smart-biz-card__close:focus-visible {
    background: #ffffff;
    border-color: rgba(5, 31, 45, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
}

.smart-biz-card__close svg,
.smart-biz-card__button svg,
.smart-biz-card__secondary svg,
.smart-biz-card__icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.smart-biz-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
}

.smart-biz-card__text {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px 15px 16px;
}

.smart-biz-card__pill {
    align-self: flex-start;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    color: #eaf9ff;
    background: linear-gradient(135deg, rgba(34, 142, 181, 0.82), rgba(28, 117, 166, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.smart-biz-card__title {
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: 0;
}

.smart-biz-card__description {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
}

.smart-biz-card__benefits {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.smart-biz-card__benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.77rem;
    font-weight: 600;
}

.smart-biz-card__benefits li:last-child {
    border-bottom: 0;
}

.smart-biz-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #d7faff;
    background: linear-gradient(135deg, rgba(38, 174, 181, 0.56), rgba(45, 92, 161, 0.58));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.smart-biz-card__icon svg {
    width: 15px;
    height: 15px;
}

.smart-biz-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin-top: 2px;
}

.smart-biz-card__button,
.smart-biz-card__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    line-height: 1.2;
}

.smart-biz-card__button {
    min-height: 39px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #20d66f, #14bd61);
    box-shadow: 0 13px 24px rgba(20, 189, 97, 0.22);
    font-size: 0.8rem;
    font-weight: 700;
}

.smart-biz-card__button:hover,
.smart-biz-card__button:focus-visible {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 15px 28px rgba(20, 189, 97, 0.28);
}

.smart-biz-card__button svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}

.smart-biz-card__secondary {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.76rem;
    font-weight: 600;
}

.smart-biz-card__secondary:hover,
.smart-biz-card__secondary:focus-visible {
    color: #ffffff;
}

.smart-biz-card__image {
    position: relative;
    flex: none;
    height: 148px;
    min-width: 0;
    overflow: hidden;
}

.smart-biz-card__image::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 72px;
    height: 72px;
    background: radial-gradient(circle at top right, rgba(8, 28, 40, 0.62), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.smart-biz-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Person sits on the right — crop empty desk space on the left */
    object-position: 78% 14%;
    display: block;
    filter: saturate(1.06) contrast(1.04) brightness(1.03);
}

/* Collapsed mini tab (unchanged behaviour) */
.smart-biz-card__mini {
    display: none;
}

.smart-biz-card.is-collapsed {
    top: 52%;
    right: 0;
    width: 112px;
    max-height: none;
    border-radius: 16px 0 0 16px;
    opacity: 1;
    transform: translate3d(8px, -50%, 0) scale(1);
    overflow: visible;
}

.smart-biz-card.is-collapsed:hover,
.smart-biz-card.is-collapsed:focus-within {
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1);
}

.smart-biz-card.is-collapsed::before,
.smart-biz-card.is-collapsed .smart-biz-card__content,
.smart-biz-card.is-collapsed .smart-biz-card__close {
    display: none;
}

.smart-biz-card.is-collapsed .smart-biz-card__mini {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 10px 12px;
    border: 0;
    border-radius: inherit;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(5, 47, 63, 0.9), rgba(5, 31, 45, 0.82));
    box-shadow: 0 14px 34px rgba(6, 21, 31, 0.24);
    cursor: pointer;
}

.smart-biz-card__mini img {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
    object-position: 78% 14%;
    box-shadow: 0 8px 18px rgba(4, 18, 28, 0.22);
}

.smart-biz-card__mini span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: 100%;
    padding: 7px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #20d66f, #14bd61);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.1;
}

/* Laptop / desktop: below fixed header (72px), image row always visible */
@media (min-width: 721px) {
    .smart-biz-card:not(.is-collapsed) {
        top: 116px;
        bottom: auto;
        right: 14px;
        width: min(286px, calc(100vw - 28px));
        max-height: calc(100vh - 108px);
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        transform: translate3d(14px, 0, 0) scale(0.98);
    }

    .smart-biz-card:not(.is-collapsed).is-visible {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__content {
        display: contents;
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__image {
        grid-row: 1;
        flex: none;
        width: 100%;
        height: 96px;
        min-height: 96px;
        overflow: hidden;
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__image img {
        object-position: 82% 10%;
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__text {
        grid-row: 2;
        flex: none;
        min-width: 0;
        min-height: 0;
        gap: 5px;
        padding: 10px 12px 11px;
        overflow: hidden;
    }

    .smart-biz-card__pill {
        font-size: 0.62rem;
        padding: 4px 8px;
        line-height: 1.15;
    }

    .smart-biz-card__title {
        font-size: 0.94rem;
        line-height: 1.08;
    }

    .smart-biz-card__description {
        font-size: 0.7rem;
        line-height: 1.28;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .smart-biz-card__benefits li {
        min-height: 22px;
        font-size: 0.67rem;
        gap: 6px;
    }

    .smart-biz-card__icon {
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .smart-biz-card__icon svg {
        width: 13px;
        height: 13px;
    }

    .smart-biz-card__actions {
        gap: 5px;
        margin-top: 0;
    }

    .smart-biz-card__button {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 0.73rem;
    }

    .smart-biz-card__button svg {
        width: 17px;
        height: 17px;
    }

    .smart-biz-card__secondary {
        font-size: 0.67rem;
    }

    .smart-biz-card__close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        z-index: 20;
    }
}

/* Short laptop screens — compress text, keep image row */
@media (min-width: 721px) and (max-height: 780px) {
    .smart-biz-card:not(.is-collapsed) {
        top: 92px;
        width: min(276px, calc(100vw - 24px));
        max-height: calc(100vh - 100px);
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__image {
        height: 84px;
        min-height: 84px;
    }

    .smart-biz-card:not(.is-collapsed) .smart-biz-card__text {
        gap: 4px;
        padding: 8px 11px 10px;
    }

    .smart-biz-card__title {
        font-size: 0.9rem;
    }

    .smart-biz-card__description {
        -webkit-line-clamp: 1;
    }

    .smart-biz-card__benefits li {
        min-height: 20px;
        font-size: 0.65rem;
    }

    .smart-biz-card__button {
        min-height: 32px;
    }
}

/* Mobile: sit above WhatsApp float, stick to right edge when collapsed */
@media (max-width: 720px) {
    .smart-biz-card {
        top: auto;
        left: auto;
        right: 10px;
        bottom: calc(142px + env(safe-area-inset-bottom));
        width: min(286px, calc(100vw - 24px));
        max-height: calc(100vh - 200px);
        border-radius: 16px;
        transform: translate3d(0, 14px, 0) scale(0.98);
    }

    .smart-biz-card.is-visible {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .smart-biz-card__content {
        overflow: hidden;
    }

    .smart-biz-card__image {
        height: 100px;
    }

    .smart-biz-card__image img {
        object-position: 78% 12%;
    }

    .smart-biz-card__text {
        gap: 7px;
        padding: 12px 12px 14px;
    }

    .smart-biz-card__pill {
        padding: 5px 9px;
        font-size: 0.64rem;
    }

    .smart-biz-card__title {
        font-size: 1rem;
        line-height: 1.1;
    }

    .smart-biz-card__description {
        font-size: 0.76rem;
        line-height: 1.32;
    }

    .smart-biz-card__benefits {
        display: none;
    }

    .smart-biz-card__button {
        min-height: 38px;
        padding: 9px 12px;
        font-size: 0.78rem;
    }

    .smart-biz-card__secondary {
        font-size: 0.74rem;
    }

    .smart-biz-card__close {
        top: 8px;
        right: 8px;
    }

    /* Collapsed mini tab: flush to right edge, clear of WhatsApp (68px + 56px + gap) */
    .smart-biz-card.is-collapsed {
        top: auto;
        right: 0;
        bottom: calc(138px + env(safe-area-inset-bottom));
        width: 96px;
        border-radius: 14px 0 0 14px;
        transform: translate3d(6px, 0, 0) scale(1);
    }

    .smart-biz-card.is-collapsed:hover,
    .smart-biz-card.is-collapsed:focus-within {
        transform: translate3d(0, 0, 0) scale(1);
    }

    .smart-biz-card.is-collapsed .smart-biz-card__mini {
        padding: 8px 8px 10px;
        gap: 7px;
    }

    .smart-biz-card__mini img {
        width: 66px;
        height: 66px;
        border-radius: 12px;
        object-position: 78% 12%;
    }

    .smart-biz-card__mini span {
        min-height: 29px;
        padding: 6px 7px;
        font-size: 0.7rem;
    }
}

@media (max-width: 390px) {
    .smart-biz-card:not(.is-collapsed) {
        width: min(274px, calc(100vw - 20px));
        bottom: calc(136px + env(safe-area-inset-bottom));
    }

    .smart-biz-card__image {
        height: 96px;
    }

    .smart-biz-card__title {
        font-size: 0.96rem;
    }

    .smart-biz-card.is-collapsed {
        bottom: calc(132px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .smart-biz-card {
        transition: none;
    }
}
