/* IranFit — mobile app install banner */

.if-app-banner {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 950;
    direction: rtl;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

.if-app-banner[hidden] {
    display: none !important;
}

.if-banner-card {
    background: linear-gradient(160deg, #14283f 0%, #1e3a5f 55%, #1a3352 100%);
    color: #f5f7fa;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.if-banner-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 12px;
}

.if-banner-main[hidden],
.if-install-steps[hidden] {
    display: none !important;
}

.if-banner-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    object-fit: contain;
    padding: 4px;
    flex-shrink: 0;
}

.if-banner-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.if-banner-copy strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.if-banner-copy span {
    font-size: 11px;
    color: rgba(245, 247, 250, 0.72);
    line-height: 1.5;
}

.if-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    flex-shrink: 0;
}

.if-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: #c8f542;
    color: #12202f;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, filter 0.15s;
}

.if-btn-download:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

.if-banner-close {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.if-banner-card {
    position: relative;
}

.if-install-steps {
    padding: 14px 16px 16px;
}

.if-install-steps h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: #c8f542;
}

.if-install-steps ol {
    margin: 0;
    padding: 0 18px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.if-install-steps li {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(245, 247, 250, 0.9);
}

.if-install-steps li strong {
    color: #fff;
}

.if-step-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.if-btn-ghost {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #f5f7fa;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.if-open-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(200, 245, 66, 0.12);
    border: 1px solid rgba(200, 245, 66, 0.28);
    font-size: 11px;
    line-height: 1.6;
    color: #eaffb0;
}

.if-open-hint[hidden] {
    display: none !important;
}

@media (max-width: 420px) {
    .if-banner-main {
        flex-wrap: wrap;
    }

    .if-banner-actions {
        flex-direction: row;
        width: 100%;
    }

    .if-btn-download {
        flex: 1;
    }
}

/* Leave room when bottom-nav present */
body:has(.bottom-nav) .if-app-banner {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
