/* =========================================================
   Install Prompt – "Add to Home Screen" bottom sheet
   Shows only on mobile devices (iOS/Android).
   Designed to match the site's visual language (style.css vars).
   ========================================================= */

.install-prompt {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    pointer-events: none;
    direction: rtl;
}

.install-prompt.is-visible {
    display: block;
    pointer-events: auto;
}

/* Dark, soft backdrop behind the sheet */
.install-prompt__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 40, 0.42);
    opacity: 0;
    transition: opacity 0.32s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.install-prompt.is-visible .install-prompt__backdrop {
    opacity: 1;
}

/* The bottom sheet / card */
.install-prompt__sheet {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    background: #ffffff;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    box-shadow: 0 -12px 40px rgba(20, 24, 40, 0.18);
    padding: 22px 22px calc(22px + env(safe-area-inset-bottom, 0));
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(110%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: var(--font, 'IBM Plex Sans Hebrew', 'Heebo', sans-serif);
    color: var(--dark, #343439);
}

.install-prompt.is-visible .install-prompt__sheet {
    transform: translateY(0);
}

/* Small drag handle at the top */
.install-prompt__handle {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: #e2e4ec;
    margin: 2px auto 16px;
}

/* Header */
.install-prompt__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.install-prompt__icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue, #195CFF) 0%, #4f7dff 100%);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(25, 92, 255, 0.28);
}

.install-prompt__icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.install-prompt__titles {
    flex: 1 1 auto;
    min-width: 0;
}

.install-prompt__title {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--dark, #343439);
}

.install-prompt__subtitle {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--gray, #6a6a6a);
    margin: 0;
}

/* Close button (top-start) */
.install-prompt__close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f3f4f8;
    color: var(--dark-2, #555);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.install-prompt__close:hover,
.install-prompt__close:focus-visible {
    background: #e7e9f0;
    transform: scale(1.05);
    outline: none;
}

.install-prompt__close svg {
    width: 16px;
    height: 16px;
}

/* Steps list */
.install-prompt__steps {
    list-style: none;
    margin: 6px 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: ip-step;
}

.install-prompt__step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f7f8fc;
    border: 1px solid #eceef5;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--dark, #343439);
}

.install-prompt__step-number {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue, #195CFF);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    display: grid;
    place-items: center;
}

.install-prompt__step-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--blue-light, #e8eeff);
    color: var(--blue, #195CFF);
    display: grid;
    place-items: center;
}

.install-prompt__step-icon svg {
    width: 18px;
    height: 18px;
}

.install-prompt__step-text {
    flex: 1 1 auto;
}

.install-prompt__step-text b {
    font-weight: 700;
    color: var(--dark, #343439);
}

/* Actions */
.install-prompt__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.install-prompt__btn {
    appearance: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.install-prompt__btn--primary {
    background: var(--blue, #195CFF);
    color: #fff;
    box-shadow: 0 6px 16px rgba(25, 92, 255, 0.28);
}

.install-prompt__btn--primary:hover,
.install-prompt__btn--primary:focus-visible {
    background: var(--blue-dark, #1249d6);
    outline: none;
}

.install-prompt__btn--primary:active {
    transform: scale(0.98);
}

.install-prompt__btn--ghost {
    background: transparent;
    color: var(--gray, #6a6a6a);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 10px;
}

.install-prompt__btn--ghost:hover,
.install-prompt__btn--ghost:focus-visible {
    color: var(--dark, #343439);
    text-decoration: underline;
    outline: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .install-prompt__sheet,
    .install-prompt__backdrop {
        transition: none;
    }
}

/* Drawer entry point — keep the label on one line, never wrap */
.nav-drawer-link-install .nav-drawer-link-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Very small screens tuning */
@media (max-width: 360px) {
    .install-prompt__title { font-size: 1.08rem; }
    .install-prompt__step { font-size: 0.9rem; padding: 10px 12px; }
}
