.chapuk-install-card {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .875rem;
    padding: 1rem;
    border: 1px solid #e2e3ff;
    border-radius: 1.125rem;
    background: linear-gradient(135deg, #fff, #f6f5ff);
    box-shadow: 0 9px 22px #312e8110;
    color: #252258;
    text-align: start;
    text-decoration: none;
    transition: border-color .18s, box-shadow .18s;
}

.chapuk-install-card:hover {
    border-color: #a6a1ff;
    box-shadow: 0 10px 24px #312e811d;
}

.chapuk-install-card:focus-visible,
.chapuk-install-close:focus-visible,
.chapuk-install-language button:focus-visible {
    outline: 3px solid #6259e8;
    outline-offset: 3px;
}

.chapuk-install-card img {
    display: block;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid #eeedff;
    border-radius: .95rem;
    background: #fff;
    object-fit: cover;
}

.chapuk-install-card strong,
.chapuk-install-card .chapuk-install-status {
    display: block;
    overflow-wrap: anywhere;
}

.chapuk-install-card strong { font-size: 1rem; font-weight: 800; }
.chapuk-install-status { margin-block-start: .15rem; font-size: .825rem; color: #5f5684; }
.chapuk-install-card[data-installed="true"] .chapuk-install-status { color: #076749; font-weight: 700; }

.chapuk-install-chevron {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #eceaff;
    color: #5145c6;
}

.chapuk-install-chevron::before {
    content: '';
    width: .48rem;
    height: .48rem;
    border-block-start: 2px solid currentColor;
    border-inline-end: 2px solid currentColor;
    transform: translateX(-1px) rotate(45deg);
}

[dir="rtl"] .chapuk-install-chevron::before { transform: translateX(1px) rotate(-45deg); }

.chapuk-install-dialog,
.chapuk-install-language {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    color: #252258;
    background: #f5f6fc;
    border: 1px solid #e7e5fd;
    border-radius: 1.5rem;
    box-shadow: 0 30px 90px #20185045;
}

.chapuk-install-dialog {
    width: min(52rem, calc(100% - 2rem));
    max-width: none;
    max-height: none;
    height: min(44rem, calc(100vh - 2rem));
    height: min(44rem, calc(100dvh - 2rem));
    overflow: hidden;
}

.chapuk-install-dialog[open] { display: flex; flex-direction: column; }
.chapuk-install-dialog::backdrop,
.chapuk-install-language::backdrop { background: #19163382; }

.chapuk-install-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: .65rem .9rem;
    border-bottom: 1px solid #e8e7f6;
    background: #fff;
}

.chapuk-install-close {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: .8rem;
    background: #eeecfc;
    color: #413778;
    font: 1.45rem/1 sans-serif;
    cursor: pointer;
}

.chapuk-install-dialog iframe { flex: 1; width: 100%; min-height: 0; border: 0; }
.chapuk-install-language { width: min(24rem, calc(100% - 2rem)); padding: 1.4rem; text-align: center; }
.chapuk-install-language h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.chapuk-install-language p { margin: .5rem 0; }
.chapuk-install-language [role="alert"] { color: #a61d37; }
.chapuk-install-language button {
    display: block;
    width: 100%;
    margin-block-start: .5rem;
    min-height: 2.75rem;
    border: 1px solid #e2e3ff;
    border-radius: .75rem;
    background: #fff;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 540px) {
    .chapuk-install-dialog { width: calc(100% - 1rem); height: calc(100dvh - 1rem); border-radius: 1.15rem; }
}

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