.pk-webapp-widget {
    position: fixed;
    top: max(78px, calc(env(safe-area-inset-top) + 14px));
    right: 14px;
    z-index: 1220;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.pk-webapp-widget * {
    box-sizing: border-box;
}

.pk-webapp-widget.is-open,
.pk-webapp-widget .pk-webapp-panel,
.pk-webapp-widget .pk-webapp-chip {
    pointer-events: auto;
}

.pk-webapp-chip {
    align-items: center;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.94));
    border: 1px solid rgba(25, 20, 68, 0.1);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(16, 31, 56, 0.12);
    color: #13284f;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    margin-left: auto;
    min-height: 42px;
    padding: 0 14px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.pk-webapp-chip:hover {
    box-shadow: 0 14px 32px rgba(16, 31, 56, 0.16);
    transform: translateY(-1px);
}

.pk-webapp-chip i {
    color: #324f7f;
    font-size: 12px;
}

.pk-webapp-widget.is-open .pk-webapp-chip i {
    transform: rotate(180deg);
}

.pk-webapp-chip-dot {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    display: inline-block;
    height: 10px;
    width: 10px;
}

.pk-webapp-chip-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
}

.pk-webapp-panel {
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.96));
    border: 1px solid rgba(19, 40, 79, 0.12);
    border-radius: 18px;
    box-shadow: 0 22px 52px rgba(11, 26, 51, 0.2);
    margin-top: 10px;
    overflow: hidden;
    padding: 14px;
}

.pk-webapp-panel.hide {
    display: none;
}

.pk-webapp-panel-head {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.pk-webapp-panel-head h4 {
    color: #112447;
    font-size: 15px;
    font-weight: 900;
    margin: 0;
}

.pk-webapp-panel-head p {
    color: #566f95;
    font-size: 12px;
    margin: 3px 0 0;
}

.pk-webapp-icon-btn {
    align-items: center;
    background: #f2f6fd;
    border: 1px solid #d7e2f4;
    border-radius: 10px;
    color: #26497a;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-width: 32px;
    padding: 0;
}

.pk-webapp-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
}

.pk-webapp-primary,
.pk-webapp-secondary,
.pk-webapp-tertiary {
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    min-height: 42px;
    padding: 0 12px;
}

.pk-webapp-primary {
    background: linear-gradient(135deg, #0f2d58 0%, #1f5ca6 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.pk-webapp-secondary {
    background: #ffffff;
    border: 1px solid #d2dff2;
    color: #163867;
}

.pk-webapp-tertiary {
    align-items: center;
    background: #f5f8fe;
    border: 1px solid #dbe6f6;
    color: #35598f;
    display: inline-flex;
    gap: 8px;
    grid-column: 1 / -1;
    justify-content: center;
}

.pk-webapp-help {
    background: rgba(16, 45, 88, 0.04);
    border: 1px solid rgba(16, 45, 88, 0.08);
    border-radius: 12px;
    color: #4e6890;
    font-size: 12px;
    line-height: 1.5;
    margin: 12px 0 0;
    padding: 10px 11px;
}

.pk-webapp-header-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    margin-right: 10px;
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
}

.pk-webapp-header-link i {
    font-size: 12px;
}

@media screen and (max-width: 991px) {
    .pk-webapp-header-link {
        display: none !important;
    }
}

@media screen and (max-width: 760px) {
    .pk-webapp-widget {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: max(84px, calc(env(safe-area-inset-bottom) + 16px));
        width: auto;
    }

    body.page-apparel .pk-webapp-widget,
    body.page-timpwear .pk-webapp-widget {
        bottom: max(168px, calc(env(safe-area-inset-bottom) + 90px));
    }

    .pk-webapp-chip {
        min-height: 40px;
        width: 100%;
    }

    .pk-webapp-actions {
        grid-template-columns: 1fr;
    }
}
