/* "Ana ekrana ekle" cubugu + iOS anlatim penceresi.
   Sadece telefonda ve uygulama HENUZ ana ekrana eklenmemisken gorunur (bkz. js/pwa.js).
   Renkler tokens.css'ten gelir — iki sayfada da (index/login) o dosya zaten yukleniyor. */

.install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    /* iPhone'un alt cubugu (home indicator) butonlari yutmasin */
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 900;

    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 6px rgba(20, 27, 46, 0.08), 0 18px 40px -16px rgba(20, 27, 46, 0.35);

    font-family: var(--font-ui);
    animation: install-bar-in 0.28s ease-out;
}

@keyframes install-bar-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.install-bar__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

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

.install-bar__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

.install-bar__sub {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.35;
    margin-top: 2px;
}

.install-bar__add {
    flex-shrink: 0;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--red);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.install-bar__add:active { background: var(--red-deep); }

.install-bar__close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.install-bar__close:active { background: var(--paper); }

/* Cubuk aciktken sayfanin en altindaki icerigin altinda kalmamasi icin */
body.has-install-bar { padding-bottom: 96px; }

/* ---------- iOS anlatim penceresi ---------- */

.install-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(20, 27, 46, 0.45);
    font-family: var(--font-ui);
}

.install-sheet__card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 22px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    animation: install-sheet-in 0.3s ease-out;
}

@keyframes install-sheet-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.install-sheet__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}

.install-sheet__sub {
    margin: 0 0 18px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.45;
}

.install-sheet__steps {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.install-sheet__steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 1.4;
}

.install-sheet__num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-sheet__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    vertical-align: -5px;
    color: var(--sea);
}

.install-sheet__ok {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 520px) {
    .install-sheet { align-items: center; }
    .install-sheet__card { border-radius: var(--radius-lg); }
}
