/** F6.3 — promo și ghid accesibil pentru instalarea PWA. */

.app-install-promo[hidden],
.app-install-panel[hidden],
.app-install-native[hidden] {
    display: none !important;
}

.app-install-promo {
    margin: 1rem 0 1.5rem;
}

.app-install-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at 95% 0%, rgba(244, 63, 94, 0.16), transparent 38%),
        linear-gradient(135deg, #eef2ff 0%, #ffffff 62%, #fff1f2 100%);
    box-shadow: 0 14px 36px rgba(30, 41, 59, 0.09);
}

.app-install-card::after {
    position: absolute;
    z-index: -1;
    right: -38px;
    bottom: -50px;
    width: 150px;
    height: 150px;
    border: 24px solid rgba(99, 102, 241, 0.07);
    border-radius: 50%;
    content: "";
}

.app-install-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18);
}

.app-install-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.app-install-logo-image--demo {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
}

.app-install-logo-image--result {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.app-install-copy {
    min-width: 0;
}

.app-install-eyebrow,
.app-install-modal-kicker {
    display: block;
    margin-bottom: 0.2rem;
    color: #4f46e5;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    line-height: 1.3;
    text-transform: uppercase;
}

.app-install-copy h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 800;
    line-height: 1.2;
}

.app-install-copy p {
    max-width: 590px;
    margin: 0.28rem 0 0;
    color: #5c667a;
    font-size: 0.86rem;
    line-height: 1.45;
}

.app-install-open {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.9rem;
    border: 0;
    border-radius: 12px;
    background: #4f46e5;
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    white-space: nowrap;
    box-shadow: 0 7px 18px rgba(79, 70, 229, 0.24);
}

.app-install-open:hover,
.app-install-open:focus-visible {
    background: #4338ca;
    color: #fff;
}

.app-install-open:focus-visible,
.app-install-tab:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 2px;
}

.app-install-open svg {
    width: 17px;
    height: 17px;
}

.app-install-modal .modal-dialog {
    max-width: 620px;
}

.app-install-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.25);
}

.app-install-modal-header {
    align-items: flex-start;
    padding: 1.25rem 1.25rem 0.65rem;
    border: 0;
}

.app-install-modal-header .modal-title {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 850;
}

.app-install-modal .btn-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe2ea;
    border-radius: 50%;
    background-color: #f8fafc;
    background-size: 14px;
    opacity: 1;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
}

.app-install-modal .btn-close:hover,
.app-install-modal .btn-close:focus-visible {
    border-color: #a5b4fc;
    background-color: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.app-install-modal .modal-body {
    padding: 0.35rem 1.25rem 1rem;
}

.app-install-intro {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

.app-install-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    padding: 0.3rem;
    border-radius: 14px;
    background: #eef2f7;
}

.app-install-tab {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
}

.app-install-tab[aria-selected="true"] {
    background: #fff;
    color: #4338ca;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.app-install-tab svg {
    width: 18px;
    height: 18px;
}

.app-install-brand-icon {
    width: 18px;
    height: 18px;
}

.app-install-brand-icon--android {
    color: #3ddc84;
}

.app-install-panel:not([hidden]) {
    display: block;
}

.app-install-demo {
    min-width: 0;
    margin-top: 0.75rem;
    padding: 0.6rem;
    border: 1px solid rgba(79, 70, 229, 0.14);
    border-radius: 18px;
    background: linear-gradient(145deg, #eef2ff, #fff7ed);
}

.app-install-demo-phone {
    position: relative;
    width: min(100%, 270px);
    height: 190px;
    margin: 0 auto;
    overflow: hidden;
    border: 7px solid #202634;
    border-radius: 28px;
    background: #f8fafc;
    box-shadow: 0 14px 26px rgba(30, 41, 59, 0.16);
}

.app-install-demo-status {
    display: flex;
    height: 25px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #fff;
    color: #1f2937;
    font-size: 0.56rem;
    font-weight: 800;
}

.app-install-demo-page {
    display: flex;
    height: 108px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% 35%, rgba(99, 102, 241, 0.18), transparent 36%),
        linear-gradient(180deg, #fff, #f8fafc);
}

.app-install-demo-page > strong {
    margin-top: 0.45rem;
    color: #1f2937;
    font-size: 0.83rem;
}

.app-install-demo-subtitle {
    margin-top: 0.1rem;
    color: #64748b;
    font-size: 0.58rem;
}

.app-install-demo-browser-bar {
    position: absolute;
    z-index: 3;
    right: 8px;
    bottom: 7px;
    left: 8px;
    display: flex;
    height: 39px;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 13px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: #475569;
    font-size: 0.64rem;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(30, 41, 59, 0.12);
}

.app-install-demo--android .app-install-demo-browser-bar {
    top: 31px;
    bottom: auto;
}

.app-install-demo-action {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #4f46e5;
    animation: app-install-action 7s ease-in-out infinite;
}

.app-install-demo-action svg {
    width: 17px;
    height: 17px;
}

.app-install-demo-sheet {
    position: absolute;
    z-index: 5;
    right: 8px;
    bottom: 7px;
    left: 8px;
    padding: 0.55rem 0.55rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(28px);
    animation: app-install-sheet 7s ease-in-out infinite;
}

.app-install-demo-handle {
    display: block;
    width: 34px;
    height: 4px;
    margin: 0 auto 0.5rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.app-install-demo-choice {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.6rem;
    border-radius: 11px;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.68rem;
    font-weight: 750;
}

.app-install-demo-choice svg {
    width: 17px;
    height: 17px;
    color: #4f46e5;
}

.app-install-demo-result {
    position: absolute;
    z-index: 6;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(160deg, #eef2ff, #fff1f2);
    opacity: 0;
    transform: scale(0.92);
    animation: app-install-result 7s ease-in-out infinite;
}

.app-install-demo-result > strong {
    margin-top: 0.45rem;
    color: #1e293b;
    font-size: 0.7rem;
}

.app-install-steps {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-install-steps li {
    display: grid;
    min-width: 0;
    grid-template-columns: 30px 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.app-install-step-number {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eeecff;
    color: #4f46e5;
    font-size: 0.76rem;
    font-weight: 850;
}

.app-install-step-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #4f46e5;
}

.app-install-step-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-install-step-icon .app-install-step-icon-fill {
    fill: currentColor;
    stroke: none;
}

.app-install-steps strong,
.app-install-steps div > span {
    display: block;
}

.app-install-steps strong {
    color: #1e293b;
    font-size: 0.84rem;
    line-height: 1.3;
}

.app-install-steps div > span {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
}

@keyframes app-install-action {
    0%, 8%, 28%, 100% { background: transparent; transform: scale(1); }
    13%, 22% { background: #e9e7ff; transform: scale(1.15); }
}

@keyframes app-install-sheet {
    0%, 26%, 72%, 100% { opacity: 0; transform: translateY(28px); }
    34%, 64% { opacity: 1; transform: translateY(0); }
}

@keyframes app-install-result {
    0%, 64%, 100% { opacity: 0; transform: scale(0.92); }
    73%, 93% { opacity: 1; transform: scale(1); }
}

.app-install-native {
    min-height: 44px;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    border-radius: 11px;
    font-weight: 700;
}

.app-install-native:not([hidden]) {
    display: inline-flex;
}

.app-install-native svg {
    width: 17px;
    height: 17px;
}

@media (display-mode: standalone) {
    .app-install-promo,
    .app-install-modal {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .app-install-promo--home {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .app-install-card {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 0.7rem 0.8rem;
        padding: 1rem;
        border-radius: 17px;
    }

    .app-install-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .app-install-eyebrow {
        font-size: 0.62rem;
    }

    .app-install-copy p {
        font-size: 0.78rem;
    }

    .app-install-open {
        grid-column: 1 / -1;
        width: 100%;
    }

    .app-install-modal .modal-dialog {
        min-height: 100dvh;
        align-items: stretch;
        margin: 0;
    }

    .app-install-modal .modal-content {
        min-height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .app-install-modal-header {
        padding-top: calc(0.9rem + env(safe-area-inset-top));
    }

    .app-install-modal-header,
    .app-install-modal .modal-body {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .app-install-modal .modal-body {
        padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
    }

    .app-install-panel:not([hidden]) {
        display: block;
    }

    .app-install-demo {
        margin-top: 0.7rem;
    }
}

[data-bs-theme="dark"] .app-install-card {
    border-color: rgba(129, 140, 248, 0.25);
    background:
        radial-gradient(circle at 95% 0%, rgba(244, 63, 94, 0.15), transparent 38%),
        linear-gradient(135deg, #172033 0%, #111827 70%, #241827 100%);
}

[data-bs-theme="dark"] .app-install-copy h2,
[data-bs-theme="dark"] .app-install-modal-header .modal-title,
[data-bs-theme="dark"] .app-install-steps strong {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .app-install-copy p,
[data-bs-theme="dark"] .app-install-intro,
[data-bs-theme="dark"] .app-install-steps div > span {
    color: #aeb9ca;
}

[data-bs-theme="dark"] .app-install-modal .modal-content {
    background: #111827;
}

[data-bs-theme="dark"] .app-install-tabs,
[data-bs-theme="dark"] .app-install-steps li {
    border-color: #334155;
    background: #1e293b;
}

[data-bs-theme="dark"] .app-install-tab[aria-selected="true"] {
    border-color: #3d4b61;
    background: #273449;
    color: #c7d2fe;
}

[data-bs-theme="dark"] .app-install-demo {
    border-color: #334155;
    background: linear-gradient(145deg, #172033, #241827);
}

[data-bs-theme="dark"] .app-install-step-icon {
    background: #273449;
    color: #a5b4fc;
}

[data-bs-theme="dark"] .app-install-modal .btn-close {
    border-color: #475569;
    background-color: #f8fafc;
}

@media (prefers-reduced-motion: reduce) {
    .app-install-demo-action,
    .app-install-demo-sheet,
    .app-install-demo-result {
        animation: none;
    }

    .app-install-demo-action {
        background: #e9e7ff;
    }

    .app-install-demo-sheet {
        opacity: 1;
        transform: none;
    }

    .app-install-demo-result {
        display: none;
    }
}
